Submission #6944716
Source Code Expand
#include<bits/stdc++.h> using namespace std; int y,m,d,t; int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};。 char ch; { return (!(year%4)&&year%100||!(year%400)); } int main() { cin>>y>>ch>>m>>ch>>d; if (leap(y)) a[2]++; while (y%(d*m)) { ++d; if (d>a[m]) { m++; d=1; } if (m>12) { ++y; m=1; } } cout<<y<<'/'<<m/10<<m%10<<'/'<<d/10<<d%10<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 割り切れる日付 |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 533 Byte |
Status | CE |
Compile Error
./Main.cpp:4:1: error: stray ‘\343’ in program int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};。 ^ ./Main.cpp:4:1: error: stray ‘\200’ in program ./Main.cpp:4:1: error: stray ‘\202’ in program ./Main.cpp:6:1: error: expected unqualified-id before ‘{’ token { ^ ./Main.cpp: In function ‘int main()’: ./Main.cpp:12:15: error: ‘leap’ was not declared in this scope if (leap(y)) ^