Submission #2242865
Source Code Expand
#include<iostream> using namespace std; int read() { int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-') { f=-1; } ch=getchar(); } while(ch>='0'&&ch<='9') { x=x*10+ch-'0'; ch=getchar(); } return x*f; } int main() { int n=read(); cout<<(n+1)%12; }
Submission Info
Submission Time | |
---|---|
Task | A - 来月は何月? |
User | luogu_bot2 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 361 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int read()’: ./Main.cpp:5:33: error: ‘getchar’ was not declared in this scope int x=0,f=1;char ch=getchar(); ^