Submission #162588
Source Code Expand
#include <iostream> #include <string> using namespace std; int main(void){ char A[11] = ""; scanf("%s",A); if(!strcmp(A,"a")){ cout << "-1" << endl; return 0; } int len = strlen(A); if(len > 1){ for(int i=0;i<len-1;i++){ cout << A[i]; } cout << endl; return 0; } else{ cout << "a" << endl; return 0; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 辞書式順序 |
User | aegiscurl |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 478 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:8:17: error: ‘scanf’ was not declared in this scope ./Main.cpp:10:21: error: ‘strcmp’ was not declared in this scope ./Main.cpp:15:23: error: ‘strlen’ was not declared in this scope