submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s150838269
p00006
C
#include<stdio.h> #include<string.h> #define MAX 30 int main() { char str[MAX]; scanf("%s",str); int num = strlen(str); int i; for(i=0;i<num;i++) { printf("%c",str[num-i-1]); } printf("\n"); } return 0; }
main.c:18:9: error: expected identifier or '(' before 'return' 18 | return 0; | ^~~~~~ main.c:19:1: error: expected identifier or '(' before '}' token 19 | } | ^
s525013313
p00006
C
#include<stdio.h> int main(void){ int i; char str[21]; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ printf("%c",str[i]); } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s438511997
p00006
C
#include<stdio.h> int main(void){ int i; char str[21]; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ printf("%c",str[i]); } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s069980617
p00006
C
#include<stdio.h> int main(void){ int i; char str[21]; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ if(str[i]!='\n'){ printf("%c",str[i]); } } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s756836168
p00006
C
#include<stdio.h> char str[21]; int main(void){ int i; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ if(str[i]!='\n'){ printf("%c",str[i]); } } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s645672185
p00006
C
#include<stdio.h> char str[25]; int main(void){ int i; gets(str); for(i=24;i>=0;--i){ if(str[i]!='\0'){ if(str[i]!='\n'){ printf("%c",str[i]); } } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s951320212
p00006
C
main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
main.c:1:6: error: unknown type name 'a' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^ main.c:1:12: error: unknown type name 'i' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^
s179445850
p00006
C
main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
main.c:1:6: error: unknown type name 'a' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^ main.c:1:12: error: unknown type name 'i' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^
s441083595
p00006
C
main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ^~~~ main.c: In function 'main': main.c:1:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){char a;~scanf("%c",&a)&&(main()||prin...
s362216882
p00006
C
main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} | ^~~~ main.c: In function 'main': main.c:1:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){char a;~scanf("%c",&a)&&(main()||pri...
s557843280
p00006
C
#include <stdio.h> #include <string.h> int main( void ){ int i; char s[21]; for(i=strlen(gets(s));i--;putchar(s[i])); return 0; }
main.c: In function 'main': main.c:6:22: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | for(i=strlen(gets(s));i--;putchar(s[i])); | ^~~~ | fgets main.c:6:22: error: passing argument 1 of 'strle...
s760858738
p00006
C
main(i){ char s[21]; for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); i=!puts(""); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i){ | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:3:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 3 | for(i=strlen(fgets...
s117151115
p00006
C
i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");}
main.c:1:1: warning: data definition has no type or storage class 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int] 1 |...
s926384878
p00006
C
#include<stdio.h> #include<stdlib.h> int main(void){ char a,b,i,j; char rarara[1000]; char papapa[1000]; gets(rarara); for(i=0;rarara[i]!=NULL;i++){}; a=i; for(i=0;i<a;i++) papapa[i]=rarara[a-i-1]; papapa[a]=NULL; printf("%s\n",papapa); return 0; }
main.c: In function 'main': main.c:7:2: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(rarara); | ^~~~ | fgets main.c:8:19: warning: comparison between pointer and integer 8 | for(i=0;rarara[i]!=NULL;i++){}; | ...
s259375298
p00006
C
#include<stdio.h> #include<string.h> int main(){ char in[30]; fgets(in, 30, stdin); for(i = strlen(in) - 2; i >= 0; i--) putchar(in[i]); puts(""); return 0; }
main.c: In function 'main': main.c:7:6: error: 'i' undeclared (first use in this function); did you mean 'in'? 7 | for(i = strlen(in) - 2; i >= 0; i--) putchar(in[i]); | ^ | in main.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
s200779444
p00006
C
#include<stdio.h> int main(void) { char str[20+1]; int flag = 0; int i = 0; scanf("%s",str); for(i=20;i >= 0;i--) { if(str[i] == 0x00) { flag = 1; } else if (flag) { printf("%c", str[i]); } } printf("\n"); return 0;
main.c: In function 'main': main.c:20:9: error: expected declaration or statement at end of input 20 | return 0; | ^~~~~~
s084986258
p00006
C
#include<stdio.h> #include<string.h> int main(void) { char m[21]; int f1, s; scanf("%s",m); s = strlen(m); for(f1 = s - 1; f1 >= 0; f1---) { printf("%c",m[f1]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:10:39: error: expected expression before ')' token 10 | for(f1 = s - 1; f1 >= 0; f1---) | ^
s280389721
p00006
C
#include<stdio.h> #include<string.h> int main(void) { char m[21]; int f1, s; scanf("%s",m); s = strlen(m); for(f1 = s - 1; f1 >= 0; f1--) { printf("%c",m[f1]; } printf("\n"); return 0; }
main.c: In function 'main': main.c:12:34: error: expected ')' before ';' token 12 | printf("%c",m[f1]; | ~ ^ | ) main.c:12:35: error: expected ';' before '}' token 12 | printf("%c",m[f1]; | ...
s264925918
p00006
C
#include<stdio.h> int main(){ char a[21]; int i=0; fgets(a,sizeof(a),stdin); while(a[i]!='\n') i++; for(i=i-1;i>=0;i--) printf("%c",a[i]); printf("\n"); return 0;
main.c: In function 'main': main.c:14:3: error: expected declaration or statement at end of input 14 | return 0; | ^~~~~~
s470794138
p00006
C
#include<stdio.h> #include<string> int main() { char seq[21]; int x; scanf("%s",&seq); x=strlen(seq); while(--x>=0) printf("%c",seq[x]); printf("\n"); }
main.c:2:9: fatal error: string: No such file or directory 2 | #include<string> | ^~~~~~~~ compilation terminated.
s252896789
p00006
C
#include<iostream> #include<string> using namespace std; int main() { string str; while(cin>>str) { int i; for(i=str.size()-1;i>=0;--i) cout<<str[i]; cout<<endl; } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s394280377
p00006
C
# include <stdio.h> # include <string.h> void main() { char str[1024]; gets(str); int len; len=strlen(str); for(int i=len-1;i>=0;i--) putchar(str[i]); }
main.c: In function 'main': main.c:6:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(str); | ^~~~ | fgets
s734480633
p00006
C
}
main.c:1:1: error: expected identifier or '(' before '}' token 1 | } | ^
s101763017
p00006
C
#include <stdio.h> #include <string.h> int main(void) { char str[21]; scanf("%s", str); strrev(str); printf("%s\n", str); return (0); }
main.c: In function 'main': main.c:10:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | strrev(str); | ^~~~~~ | strsep
s450869462
p00006
C
// // main.cpp // TestCppCode // // Created by Shahab Uddin on 04/20/13. // Copyright (c) 2013 ___Shahab__. All rights reserved. // #include <cstdio> #include <cstring> int main(int argc, const char * argv[]) { char input [20 + 10]; scanf ("%s", input); int length = strlen (input); for ( int i...
main.c:9:10: fatal error: cstdio: No such file or directory 9 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s596661417
p00006
C
#include<stdio.h> int main(void){ int a[21],b[21];; int i =0,j=0; while(a[i] != '\0'){ scanf("%d",&num[i]); i++; } i--; for(; i>=0; i--){ b[j] = a[i] j++;...
main.c: In function 'main': main.c:7:30: error: 'num' undeclared (first use in this function) 7 | scanf("%d",&num[i]); | ^~~ main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in main.c:12:32: error: expected ';' befor...
s393334172
p00006
C
#include<stdio.h> int main(void){ char a[21],b[21];; int i =0,j=0; while(a[i] != '\0'){ scanf("%d",&num[i]); i++; } i--; for(; i>=0; i--){ b[j] = a[i]; j+...
main.c: In function 'main': main.c:7:30: error: 'num' undeclared (first use in this function) 7 | scanf("%d",&num[i]); | ^~~ main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in
s140670513
p00006
C
include <stdio.h> int main(){ int a,cnt=0; char str[20]; scanf("%str",str); while(str[cnt]!='\0'){ cnt++; } for(;cnt>=0;cnt--) printf("%c",str[cnt]); printf("\n"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s032898858
p00006
C
include <stdio.h> int main(){ int a,cnt=0; char str[20]; scanf("%s",str); while(str[cnt]!='\0'){ cnt++; } for(;cnt>=0;cnt--) printf("%c",str[cnt]); printf("\n"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s560344612
p00006
C
#include <stdio.h> #include <conio.h> int main(void){ char sets[20]; int i; for(i=0; i<20; i++){ sets[i] = getche(); } for(i=19; i>=0; i--){ printf("%c",sets[i]); } return 0; }
main.c:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s878487399
p00006
C
#include <stdio.h> int main(void){ char sets[20]; int i; for(i=0; i<20; i++){ sets[i] = getche(); } for(i=19; i>=0; i--){ printf("%c",sets[i]); } return 0; }
main.c: In function 'main': main.c:7:18: error: implicit declaration of function 'getche'; did you mean 'getchar'? [-Wimplicit-function-declaration] 7 | sets[i] = getche(); | ^~~~~~ | getchar
s068444923
p00006
C
include <stdio.h> #include <string.h> int main(){ int i; char s[21]; scanf("%s",s); i=strlen(s); for(i=i-1;s[i] > 0;i--){ printf("%c",s[i]); } printf("\n"); return (0); }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s480050677
p00006
C
#include <stdio.h> int main(void){ char str[20],strr[20]; int i; scanf("%s",&str); for(i=0;str[i]!=\0;i++){ strr[20-i]=str[i]; } printf("%s\n",strr); return 0; }
main.c: In function 'main': main.c:7:21: error: stray '\' in program 7 | for(i=0;str[i]!=\0;i++){ | ^
s575167129
p00006
C
#include <conio.h> int main(void){ char str[20],strr[20]; int i,j; for(i=0;str[i]!=\0;i++){ str[i]=getchar(); } j=i; for(;j>=0;j--){ printf("%c",str[j]); } printf("\n"); return 0; }
main.c:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s792230818
p00006
C
#include <stdio.h> int main(void){ char str[20],strr[20]; int i,j; for(i=0;str[i]!=\0;i++){ str[i]=getchar(); } j=i; for(;j>=0;j--){ printf("%c",str[j]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:6:21: error: stray '\' in program 6 | for(i=0;str[i]!=\0;i++){ | ^
s688551807
p00006
C
main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} | ^~~~ main.c: In function 'main': main.c:1:19: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | main(){char s[21];gets(s);printf("%s\n",s...
s084266007
p00006
C
#include <stdio.h> #include <string.h> int main(void) { char str[21]; scanf("%s", str); printf("%s\n",strrev(str)); return (0); }
main.c: In function 'main': main.c:10:23: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | printf("%s\n",strrev(str)); | ^~~~~~ | strsep
s809278664
p00006
C
#include <stdio.h> #include <string.h> int main(void) { char str[21]; char str2[21]; scanf("%s", str); strrev(str); strcpy(str2, str); printf("%s\n", str2); return (0); }
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 11 | strrev(str); | ^~~~~~ | strsep
s260890974
p00006
C
#include<stdio.h> #include<string.h> int main(){ int n,t; char str[20]; while(scanf("%s",str)!=EOF){ n=strlen(str); for(t=n;t>=0;t--){ printf("%c",a[t]); } printf("\n"); } return (0); }
main.c: In function 'main': main.c:9:19: error: 'a' undeclared (first use in this function) 9 | printf("%c",a[t]); | ^ main.c:9:19: note: each undeclared identifier is reported only once for each function it appears in
s819527807
p00006
C
#include <stdio.h> int main(){ char moji[21]={'\0'}; int i,j,t,f; scanf("%s",moji); for(i=0;moji[i]!=\0;i++){ } t=i; for(j=0;j<t/2;j++){ f=moji[j]; moji[j]=moji[i-1]; moji[i-1]=f; i--; } printf("%s\n",moji); return 0; }
main.c: In function 'main': main.c:8:18: error: stray '\' in program 8 | for(i=0;moji[i]!=\0;i++){ | ^
s168954290
p00006
C
#include<stdio.h> #include<string.h> int main(){ char str[20]; gets(str); puts(strrev(str)); }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | gets(str); | ^~~~ | fgets main.c:6:10: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration...
s448864419
p00006
C
#include <stdio.h> int main(void) { char str[20]; int i; scanf("%s", str); for(i = 0; i < 20; i++) { if(str[i] != \0) printf("%c", str[i]); } }
main.c: In function 'main': main.c:10:22: error: stray '\' in program 10 | if(str[i] != \0) | ^
s178134348
p00006
C
#include <Stdio.h> #include <string.h> int main(void) { char str[20]; int i, len; scanf("%s", str); len = (int)strlen(str); for(i = len - 1; i >= 0; i--) { printf("%c", str[i]); } putchar('\n'); return(0); }
main.c:1:10: fatal error: Stdio.h: No such file or directory 1 | #include <Stdio.h> | ^~~~~~~~~ compilation terminated.
s834986064
p00006
C
#include<stdio.h> int main(){ char str[21]; int A; scanf("%s",str); for(A=0;str[A];A++); for(A--;A>=0;A--) printf("%c",str[A]); printf("\n") return 0; }
main.c: In function 'main': main.c:10:21: error: expected ';' before 'return' 10 | printf("\n") | ^ | ; 11 | return 0; | ~~~~~~
s637017247
p00006
C
#include<stdio.h> #include<string.h> int main(void) { int len; char str[20]; scanf("%s",str); len=strlen(str)-1; for(i=len;i>=0;i--) putchar(str[i]); return 0; }
main.c: In function 'main': main.c:9:13: error: 'i' undeclared (first use in this function) 9 | for(i=len;i>=0;i--) | ^ main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
s324362809
p00006
C
#include<stdio.h> #include<string.h> int main(void) { int len; char str[20]; scanf("%s",str); len=strlen(str)-1; for(i=len;i>=0;i--) putchar(str[i]); return 0; }
main.c: In function 'main': main.c:9:13: error: 'i' undeclared (first use in this function) 9 | for(i=len;i>=0;i--) | ^ main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
s325804429
p00006
C
#include <stdio.h> int main() { char ch[20]={'\0'}; int i=0,n=0; for(i=0;i<20;i++) { ch[i]=getche(); if(ch[i]=='\r')break; n++; } for(i=n-1;i>=0;i--) printf("%c",ch[i]); return 0; }
main.c: In function 'main': main.c:8:15: error: implicit declaration of function 'getche'; did you mean 'getchar'? [-Wimplicit-function-declaration] 8 | ch[i]=getche(); | ^~~~~~ | getchar
s585691165
p00006
C
#include <iostream> using namespace std; int main(){ string str,ans; int i; cin >> str; for(i = str.size() - 1 ; i != -1 ; i--){ ans += str[i]; } cout << ans << endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s977183489
p00006
C
#include <stdio.h> #include <string.h> int main() { char arr[100]; printf("\n"); gets(arr); strrev(arr); printf("\n%s\n",arr); return 0; }
main.c: In function 'main': main.c:9:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 9 | gets(arr); | ^~~~ | fgets main.c:11:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] ...
s239161950
p00006
C
#include <stdio.h> int main() { char str[20]; gets(str); strrev(str); puts(str); return 0; }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | gets(str); | ^~~~ | fgets main.c:6:5: error: implicit declaration of function 'strrev' [-Wimplicit-function-declaration] 6 | strrev(str)...
s755071194
p00006
C
#include <stdio.h> #include <string.h> int main() { char str[20]; int i; gets(str); strrev(str); puts(str); return 0; }
main.c: In function 'main': main.c:7:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets main.c:8:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]...
s858884109
p00006
C
a = raw_input() print a[::-1]
main.c:1:1: warning: data definition has no type or storage class 1 | a = raw_input() | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:5: error: implicit declaration of function 'raw_input' [-Wimplicit-function-declaration] 1 | a = raw_input() | ^~~~~...
s798852939
p00006
C
#include<stdio.h> #include<string.h> int main(){ char ch[21],c; int i=0,j; gets(ch); puts(strrev(ch)); return 0; }
main.c: In function 'main': main.c:6:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(ch); | ^~~~ | fgets main.c:7:6: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | puts...
s711217149
p00006
C
#include<stdio.h> #include<string.h> int main() { char name[20]; scanf("%s",name); printf("%s",strrev(name)); return 0; }
main.c: In function 'main': main.c:10:16: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | printf("%s",strrev(name)); | ^~~~~~ | strsep
s839667853
p00006
C
main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:20: error: implicit declaration of function 'gets' ...
s730370686
p00006
C++
#include <bits/stdc++.h> int main () { assdasd asd a sd a sda sd a s d as d as dassssssssssssssssssss }
a.cc: In function 'int main()': a.cc:4:1: error: 'assdasd' was not declared in this scope 4 | assdasd | ^~~~~~~
s887487100
p00006
C++
print(reversed(input()))
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(reversed(input())) | ^
s396983081
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string str; cin >> str; reverse(str.begin(),str.end()); cout << x << endl; return 0; }
a.cc: In function 'int main()': a.cc:21:17: error: 'x' was not declared in this scope 21 | cout << x << endl; | ^
s698946576
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string s; cin >> s; reverse(s.begin(),s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(),s.end()); | ^~~~~~~
s903884770
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str,a; a = 0 cin >> str; for(i =str.size()-1;i>=0;i--){ a += str[i]; } cout << a << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | a = 0 | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale...
s337145157
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str,a; a = 0 cin >> str; for(int i =str.size()-1;i>=0;i--){ a += str[i]; } cout << a << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | a = 0 | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale...
s072639760
p00006
C++
#include<iostream> using namespace std; int main () { string mozi; cin >> mozi; int y; y = mozi.length(); for(i=0;i<y;++i){ string reverse; reverse[i]=mozi[y-i]; } cout << reverse << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'i' was not declared in this scope 8 | for(i=0;i<y;++i){ | ^ a.cc:12:13: error: 'reverse' was not declared in this scope 12 | cout << reverse << endl; | ^~~~~~~
s790335692
p00006
C++
#include<iostream> using namespace std; int main () { string mozi; cin >> mozi; int y; y = mozi.length(); for(int i=0;i<y;++i){ string reverse; reverse[i]=mozi[y-i]; } cout << reverse << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: 'reverse' was not declared in this scope 12 | cout << reverse << endl; | ^~~~~~~
s421312695
p00006
C++
t = input() s=t[::-1] print (s)
a.cc:1:1: error: 't' does not name a type 1 | t = input() | ^
s982038355
p00006
C++
print(input()[::-1])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input()[::-1]) | ^
s867184337
p00006
C++
print(input()[::-1])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input()[::-1]) | ^
s545304231
p00006
C++
//============================================================================ // Name : 0006.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <ios...
a.cc: In function 'int main()': a.cc:15:17: error: 'reverse' was not declared in this scope 15 | reverse(s.begin() , s.end()); | ^~~~~~~
s333350096
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; cin<<str; for(int i=str.size();-1<i;i--){ cout<<str[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 8 | cin<<str; | ~~~^~~~~ | | | | | std::string {aka std::...
s976725369
p00006
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip>...
a.cc:58:1: error: expected initializer before 'main' 58 | main(){ | ^~~~
s370392722
p00006
C++
#include<stdio.h> #include<string.h> int main(){ int i,len; char str[22]; scanf'("%s",str); len=strlen(str); for(i=len-1;i>=0;i--){ printf("%c",str[i]); } printf("\n"); return 0; }
a.cc:9:6: warning: missing terminating ' character 9 | scanf'("%s",str); | ^ a.cc:9:6: error: missing terminating ' character 9 | scanf'("%s",str); | ^~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:6: error: expected ';' before 'len' 9 | scanf'("%s",str); | ^ | ...
s027202459
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; getline(cin,str); reverse(str.begin(),str.end()); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(str.begin(),str.end()); | ^~~~~~~
s037036369
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; getline(cin,str); reverse(str.begin(),str.end()); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(str.begin(),str.end()); | ^~~~~~~
s448961153
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; getline(cin,str); reverse(begin(str),end(str)); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(begin(str),end(str)); | ^~~~~~~
s758222796
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; cin>>str; reverse(begin(str),end(str)); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(begin(str),end(str)); | ^~~~~~~
s879423419
p00006
C++
#include <iostream> #include <string> int main() { std::string str; while (std::cin >> str) { for (size_t i = str.size() - 1; i != 0; --i) { std::cout << str[i]; } std::cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | std::cout << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ost...
s841922974
p00006
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main() { char s[20]; int n,T; while(cin>>s){ n=strlen(s); for(int i=0;i<(n/2);i++){ T=s[i]; s[i]=s[n-i-1]; s[n-i-1]=T; } cout<<s<<endl; ...
a.cc: In function 'int main()': a.cc:12:10: error: 'strlen' was not declared in this scope 12 | n=strlen(s); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<cstdio> +++ |+#include <cstring> 4 |
s917739684
p00006
C++
#include<cstdio> #include<cstring> using namespace std; int main() { char s[20]; int n,T; while(cin>>s){ n=strlen(s); for(int i=0;i<(n/2);i++){ T=s[i]; s[i]=s[n-i-1]; s[n-i-1]=T; } cout<<s<<endl; } return 0; ...
a.cc: In function 'int main()': a.cc:12:11: error: 'cin' was not declared in this scope 12 | while(cin>>s){ | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include<cstring> +++ |+#include <iostream> 5 | a...
s947331752
p00006
C++
char s[22]; main(i){ for(;~scanf("%c",s+i);i++); for(;i;putchar(--i?s[i]:10)); }
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(i){ | ^
s137832035
p00006
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { char a[25], i; scanf("%s", a); for(i=strlen(a)-1;i>=0;i--){ printf("%c", a[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: 'strlen' was not declared in this scope 9 | for(i=strlen(a)-1;i>=0;i--){ | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cs...
s273201437
p00006
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { char a[25], i; scanf("%s", &a); for(i=strlen(a)-1;i>=0;i--){ printf("%c", a[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: 'strlen' was not declared in this scope 9 | for(i=strlen(a)-1;i>=0;i--){ | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cs...
s347721181
p00006
C++
#include<stdio.h> #include<string.h> int main() { char s[20]; gets(s); strrev(s); puts(s); printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev(s); | ^~~~~~ | strsep
s079885514
p00006
C++
#include <stdio.h> #include <string.h> int main() { char str[19]; gets(str); strrev(str); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(str); | ^~~~ | getw a.cc:10:4: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 10 | strrev(str); | ^~~~~~ | strsep
s884457239
p00006
C++
#include <stdio.h> #include <string.h> int main () { char str[20]; while(scanf("%s",str)!=EOF) { strrev(str); printf("%s",str); printf("\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(str); | ^~~~~~ | strsep
s800324148
p00006
C++
#include<stdio.h> int main () { char str[20],s2[20]; scanf("%s",str); int i,len=0; for (i=0;str[i]!='\0';i++) { len++; } strrev(str); for (i=0;i<len;i++) printf ("%c", str[i]); printf ("\n"); return 0; }
a.cc: In function 'int main()': a.cc:15:6: error: 'strrev' was not declared in this scope 15 | strrev(str); | ^~~~~~
s276613680
p00006
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace coding { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string output = ""; for (i...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s173569462
p00006
C++
#include <stdio.h> #include <string.h> int main() { char str[20]; gets(str); strrev(str); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:7:2: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(str); | ^~~~ | getw a.cc:8:2: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(str); | ^~~~~~ | strsep
s375318172
p00006
C++
while line = gets print line.reverse+"\n" end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while line = gets | ^~~~~
s758148051
p00006
C++
print raw_input().strip()[::-1]
a.cc:1:1: error: 'print' does not name a type; did you mean 'int'? 1 | print raw_input().strip()[::-1] | ^~~~~ | int
s436367146
p00006
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip>...
a.cc:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 58 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:61:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 61 | cout << str < endl; ...
s080677103
p00006
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip>...
a.cc:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 58 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:61:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 61 | cout << str < endl; ...
s502083786
p00006
C++
line = input() ret = ""; for i in range(1,len(line)): ret += line[len(line)-1-i]; print(ret)
a.cc:1:1: error: 'line' does not name a type 1 | line = input() | ^~~~ a.cc:4:1: error: expected unqualified-id before 'for' 4 | for i in range(1,len(line)): | ^~~ a.cc:7:6: error: expected constructor, destructor, or type conversion before '(' token 7 | print(ret) | ^
s849120959
p00006
C++
#include<stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<string> #include<string.h> #include<stack> #include<queue> #include<stdlib.h> #include<ctype.h> #include<map> #include<iomanip> #define r 6371.01 #define pi 3.141592653589 #define PI acos(0.0) #define EPS 1e-7 using namespace std; int m...
a.cc: In function 'int main()': a.cc:23:19: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 23 | printf("%s\n",strrev(str)); | ^~~~~~ | strsep
s281371726
p00006
C++
#include <stdio.h> int main(void) { char str[20]; int i; scanf("%s",str); for(i = 0; strlen(str) > i; i++){ printf("%c",str[strlen(str)-1 - i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'strlen' was not declared in this scope 7 | for(i = 0; strlen(str) > i; i++){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> ++...
s766813776
p00006
C++
import java.util.Scanner; import java.lang.StringBuffer; class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); StringBuffer sb = new StringBuffer(in.nextLine()); System.out.println(sb.reverse().toString()); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.lang.StringBuffer; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmod...
s433966755
p00006
C++
#include <cstdio> #include <cstring> using namespace std; int main(){ char str[25]; fill(str, str + 25, 0); scanf("%s", str); int p = 25; while(str[--p] == 0); while(p >= 0){ printf("%c", str[p--]); } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'fill' was not declared in this scope 8 | fill(str, str + 25, 0); | ^~~~
s554080623
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(),s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'reverse' was not declared in this scope 8 | reverse(s.begin(),s.end()); | ^~~~~~~
s877346474
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(s.begin(), s.end()); | ^~~~~~~
s831563877
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(s.begin(), s.end()); | ^~~~~~~
s935070365
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(s.begin(), s.end()); | ^~~~~~~
s977717713
p00006
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <time.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <string> #include <bitset> using namespace std; #define FOR(I,F,N) for(int I = F; I < (int)(N...
a.cc: In function 'int main()': a.cc:32:34: error: expected ';' before ')' token 32 | for(int i = S.size(); i--)cout << S[i]; | ^ | ;