submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s322142831
p02256
C
#include<stdio.h> int main( ) { int x, y, z, w; scanf("%d", &x); scanf("%d", &y); if(x < y) { x = y; y = w; w = x; } z = x % y; while(z!=0) { x = y; y = z; z = x % y; } printf("%d\n", y) return 0; }
main.c: In function 'main': main.c:22:18: error: expected ';' before 'return' 22 | printf("%d\n", y) | ^ | ; 23 | return 0; | ~~~~~~
s796501582
p02256
C
#include<stdiio.h> main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } while(){ z = x % y; if(z == 0)break; } x = y; y = z; } printf("%d",y); }
main.c:1:9: fatal error: stdiio.h: No such file or directory 1 | #include<stdiio.h> | ^~~~~~~~~~ compilation terminated.
s510509155
p02256
C
#include<stdiio.h> main(){ int x,y,z; scanf("%d%d",&x &y); if(y>x){ z = y; y = x; x = y; } while(){ z = x % y; if(z == 0)break; } x = y; y = z; } printf("%d",y); }
main.c:1:9: fatal error: stdiio.h: No such file or directory 1 | #include<stdiio.h> | ^~~~~~~~~~ compilation terminated.
s188294895
p02256
C
#include<stdio.h> main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } while(){ z = x % y; if(z == 0)break; } x = y; y = z; } printf("%d",y); }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:11:11: error: expected expression before ')' token 11 | while(){ | ^ main.c: At top level: main.c:18:12: error: expected declaration specifiers or '...' before string ...
s442345387
p02256
C
#include<stdio.h> int main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } while(){ z = x % y; if(z == 0)break; } x = y; y = z; } printf("%d",y); }
main.c: In function 'main': main.c:11:11: error: expected expression before ')' token 11 | while(){ | ^ main.c: At top level: main.c:18:12: error: expected declaration specifiers or '...' before string constant 18 | printf("%d",y); | ^~~~ main.c:18:17: error: unknown type ...
s244744537
p02256
C
#include<stdio.h> int main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } while(){ z = x % y; if(z == 0)break; x = y; y = z; } printf("%d",y); }
main.c: In function 'main': main.c:13:11: error: expected expression before ')' token 13 | while(){ | ^
s760992793
p02256
C
#include<stdio.h> int main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } while(){ z = x % y; if(z == 0) break; x = y; y = z; } printf("%d",y); }
main.c: In function 'main': main.c:13:11: error: expected expression before ')' token 13 | while(){ | ^
s551695870
p02256
C
#include<stdio.h> int main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } if(x < 0 || y >1000000000) break; while(1){ z = x % y; if(z == 0) break; x = y; y = z; } printf("%d\n",y); }
main.c: In function 'main': main.c:12:32: error: break statement not within loop or switch 12 | if(x < 0 || y >1000000000) break; | ^~~~~
s670035289
p02256
C
#include<stdio.h> int main(){ int x,y,z; scanf("%d%d",&x,&y); if(y>x){ z = y; y = x; x = y; } if(x < 0 || y >1000000000) break; while(1){ z = x % y; if(z == 0) break; x = y; y = z; } printf("%d\n",y); }
main.c: In function 'main': main.c:13:32: error: break statement not within loop or switch 13 | if(x < 0 || y >1000000000) break; | ^~~~~
s162311318
p02256
C
#include<stdio.h> int main(){ int x,y,temp,result; scanf("%d%d",&x,&y); if(X<y){ temp=x; x=y; y=temp; } result=x%y; while(result!=0){ x=y; y=result; result=x%y; } printf("%d\n",y); result 0; }
main.c: In function 'main': main.c:8:8: error: 'X' undeclared (first use in this function) 8 | if(X<y){ | ^ main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in main.c:23:11: error: expected ';' before numeric constant 23 | result 0; | ...
s612410882
p02256
C
int division(int n,int m) 2 { 3 if(n<m) 4 division(m,n); //交换n,m的值 5 else if(n==m) 6 return n; 7 else 8 { 9 int temp=n; 10 n=m; 11 m=temp-n; 12 division(n,m); //重复上述过程 13 } 14 }
main.c: In function 'division': main.c:2:2: error: expected declaration specifiers before numeric constant 2 | 2 { | ^ main.c:15: error: expected '{' at end of input
s805449471
p02256
C
#include <stdio.h> int main() {   int x,y,z;     scanf("%d%d",&x,&y);   while(x!=0)   {   z=x%y;   x=y;   y=z;   }   printf("%d\n",z); return 0; }
main.c: In function 'main': main.c:4:1: error: stray '\343' in program 4 | <U+3000><U+3000>int x,y,z;<U+3000><U+3000> | ^~~~~~~~ main.c:4:3: error: stray '\343' in program 4 | <U+3000><U+3000>int x,y,z;<U+3000><U+3000> | ^~~~~~~~ main.c:4:15: error: stray '\343' in program 4 | <U+3000><U...
s225562990
p02256
C
#include <stdio.h> int main(){ int a=147 b=105; int r; r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("%d\n",b); return 0; }
main.c: In function 'main': main.c:3:13: error: expected ',' or ';' before 'b' 3 | int a=147 b=105; | ^ main.c:6:13: error: 'b' undeclared (first use in this function) 6 | r = a % b; | ^ main.c:6:13: note: each undeclared identifier is reported only once for each functi...
s656629693
p02256
C
#include<stdio.h> int main(){ int a,b,c,d; scanf("%d%d",&a,&b); if(a>b){ d=a%b; while(d!=0){ a=b; b=d; d = a%b; } printf("%d",b); } printf("%d",a); } printf("\n"); return 0; }
main.c:16:10: error: expected declaration specifiers or '...' before string constant 16 | printf("\n"); | ^~~~ main.c:17:3: error: expected identifier or '(' before 'return' 17 | return 0; | ^~~~~~ main.c:18:1: error: expected identifier or '(' before '}' token 18 | } | ^
s943530535
p02256
C
#include<stdio.h> int main(){ int a,b,c,d; scanf("%d%d",&a,&b); if(a>b){ d=a%b; while(d!=0){ a=b; b=d; d = a%b; } printf("%d",b); } printf("%d",a); } printf("\n"); return 0; }
main.c:16:10: error: expected declaration specifiers or '...' before string constant 16 | printf("\n"); | ^~~~ main.c:17:3: error: expected identifier or '(' before 'return' 17 | return 0; | ^~~~~~ main.c:18:1: error: expected identifier or '(' before '}' token 18 | } | ^
s471546641
p02256
C
#include <stdio.h> int main(){ int a, b,r; scanf("%d%d",&a,&b); if(a<b){ c = a; a = b; b = c; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("%d\n",b); return 0; }
main.c: In function 'main': main.c:7:7: error: 'c' undeclared (first use in this function) 7 | c = a; | ^ main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
s996522975
p02256
C
#include <stdio.h> int main() { int n = 0, c = getchar_unlocked(); do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0'); return n; } int gcd(int a, int b) { int r; while (b != 0) r = a % b, a = b, b = r; return a; } int main() { int a, b; a = in(), b = in(); printf("%d\n", gcd(a, b)); return ...
main.c:17:5: error: redefinition of 'main' 17 | int main() | ^~~~ main.c:3:5: note: previous definition of 'main' with type 'int()' 3 | int main() | ^~~~ main.c: In function 'main': main.c:21:13: error: implicit declaration of function 'in'; did you mean 'main'? [-Wimplicit-function-declarati...
s016734602
p02256
C
// AOJ ALDS1_1_B Greatest Common Divisor // 2018.4.26 bal4u #include <stdio.h> //#define getchar_unlocked() getchar() int main() { int n = 0, c = getchar_unlocked(); do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0'); return n; } int gcd(int a, int b) { int r; while (b != 0) r = a % b, a = b, b ...
main.c:21:5: error: redefinition of 'main' 21 | int main() | ^~~~ main.c:7:5: note: previous definition of 'main' with type 'int()' 7 | int main() | ^~~~ main.c: In function 'main': main.c:25:13: error: implicit declaration of function 'in'; did you mean 'main'? [-Wimplicit-function-declarati...
s748654709
p02256
C
#include<stdio.h> int main(){ int a,b,i,num; scaf("%d%d",a,b); if(a > b) num = a; else num = b; for(i=0; i<=num; i++){ if(a%i==0 && b&i==0) Max = a%i; } printf("%d\n",Max); }
main.c: In function 'main': main.c:5:3: error: implicit declaration of function 'scaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scaf("%d%d",a,b); | ^~~~ | scanf main.c:11:26: error: 'Max' undeclared (first use in this function) 11 | if(a%i==0 && b&i==0) Max = a%i; ...
s005971750
p02256
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s527695216
p02256
C
/home/student/s1250137/Algo/Ex01/ex1_B.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_B.c | ^
s725013914
p02256
C
#include<stdio.h> int main(){ int a,b,i,num; scaf("%d%d",a,b); if(a > b) num = a; else num = b; for(i=0; i<=num; i++){ if(a%i==0 && b&i==0) Max = a%i; } printf("%d\n",Max); }
main.c: In function 'main': main.c:5:3: error: implicit declaration of function 'scaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scaf("%d%d",a,b); | ^~~~ | scanf main.c:11:26: error: 'Max' undeclared (first use in this function) 11 | if(a%i==0 && b&i==0) Max = a%i; ...
s250386861
p02256
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s310273760
p02256
C
#include<stdio.h> int main() { int a,b,i,num,Max=1; scanf("%d%d",&a,&b); if(a > b) num = a; else num = b; for(i=num; i<=num; i--){ if(a%i==0 && b%i==0){ Max = i; break; } printf("%d\n",Max); }
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s213974788
p02256
C
#include<stdio.h> int main() { int a,b,i,num,Max=1; scanf("%d%d",&a,&b); if(a > b) num = a; else num = b; for(i=num; i<=num; i--){ if(a%i==0 && b%i==0){ Max = i; break; } printf("%d\n",Max); }
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s526221272
p02256
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s538260423
p02256
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s125269974
p02256
C
/home/student/s1250137/Algo/Ex01/ex1_B.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_B.c | ^
s883033860
p02256
C
/home/student/s1250137/Algo/Ex01/ex1_B.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_B.c | ^
s024747807
p02256
C
/home/student/s1250137/Algo/Ex01/ex1_B.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_B.c | ^
s003419474
p02256
C
/home/student/s1250137/Algo/Ex01/ex1_B.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_B.c | ^
s102903712
p02256
C
/home/student/s1250137/Algo/Ex01/ex1_B.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_B.c | ^
s943980616
p02256
C
include <stdio.h> int main(){ int x; int y; int a=1; scanf("%d%d",&x,&y); while(a!=0){ a=x%y; x=y; if(a!=0)y=a; } printf("%d\n",y); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s815298989
p02256
C
include <stdio.h> int main(){ int x; int y; int a=1; scanf("%d%d",&x,&y); while(a!=0){ a=x%y; x=y; if(a!=0)y=a; } printf("%d\n",y); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s319562981
p02256
C
#include <stdio.h> int main(void) { int x,y,gcd = 0,i; scanf("%d",&x); scanf("%d",&y); if(x < y)small = x; else small = y; for(i = 0; i < small / 2; i++){ if(x % i == 0 && y % i == 0)gcd = i; } printf("%d\n",small); }
main.c: In function 'main': main.c:6:12: error: 'small' undeclared (first use in this function) 6 | if(x < y)small = x; | ^~~~~ main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
s625912427
p02256
C
#include <stdio.h> int main(void){ int i,x,y,small; scanf("%d",&x); scanf("%d",&y); if(x < y){ small = x; big = y; } else{ small = y; big = x; } big = big % small; for(i = big; i > 0; i--){ if(big % i == 0 && small % i == 0){ printf("%d\n",i); break; } } return 0; }
main.c: In function 'main': main.c:7:16: error: 'big' undeclared (first use in this function) 7 | small = x; big = y; | ^~~ main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
s060756629
p02256
C
#include <stdio.h> int main(void); main(){ int a,b,c,d; scanf("%d %d",&a,&b); if( a<=1 || 1000000000<a || b<=1 || 100000000<b ) printf("Error\n"); return; } while(1){ c = a/b; d = a - c*b; if(d == 0) break; a = b; b = d; } printf("%d\n...
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:10:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 10 | return; | ^~~~~~ main.c:4:1: note: declared here 4 | main(){ |...
s035325337
p02256
C
#include <stdio.h> int main(void); main(){ int a,b,c,d; scanf("%d %d",&a,&b); if( a<=1 || 1000000000<a || b<=1 || 100000000<b ) printf("Error\n"); return; } while(1){ c = a/b; d = a - c*b; if(d == 0) break; a = b; b = d; } printf("%d\n...
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:10:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 10 | return; | ^~~~~~ main.c:4:1: note: declared here 4 | main(){ |...
s133341151
p02256
C
#include <stdio.h> int main(void); main(){ int a,b,c,d; scanf("%d %d",&a,&b); if( a<=1 || 1000000000<=a || b<=1 || 100000000<=b ) printf("Error\n"); return; } while(1){ c = a/b; d = a - c*b; if(d == 0) break; a = b; b = d; } printf("%d...
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:10:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 10 | return; | ^~~~~~ main.c:4:1: note: declared here 4 | main(){ |...
s933426018
p02256
C
#include <stdio.h> main(){ int a,b,c,d; scanf("%d %d",&a,&b); if( a<=1 || 1000000000<=a || b<=1 || 100000000<=b ) printf("Error\n"); return; } while(1){ c = a/b; d = a - c*b; if(d == 0) break; a = b; b = d; } printf("%d\n",b); }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:8:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 8 | return; | ^~~~~~ main.c:2:1: note: declared here 2 | main(){ | ...
s472705494
p02256
C
#include <stdio.h> int main(void); int main(){ int a,b,c,d; scanf("%d %d",&a,&b); if( a<=1 || 1000000000<=a || b<=1 || 100000000<=b ) printf("Error\n"); return; } while(1){ c = a/b; d = a - c*b; if(d == 0) break; a = b; b = d; } printf(...
main.c: In function 'main': main.c:9:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 9 | return; | ^~~~~~ main.c:3:5: note: declared here 3 | int main(){ | ^~~~ main.c: At top level: main.c:11:5: error: expected identifier or '(' before 'while...
s383123730
p02256
C
#include <stdio.h> int main(void); main(){ int a,b,c,d; scanf("%d %d",&a,&b); if( a<=1 || 1000000000<=a || b<=1 || 100000000<=b ) printf("Error\n"); return; } while(1){ c = a/b; d = a - c*b; if(d == 0) break; a = b; b = d; } printf("%d...
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:10:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 10 | return; | ^~~~~~ main.c:4:1: note: declared here 4 | main(){ |...
s178581502
p02256
C
#include <stdio.h> int main(void); main(){ int N,i,j,A[100],key; scanf("%d",&N); if( N<1 || 100<N ){ print("Error! \n Please retype"); scanf("%d",&N); } i=0; while (scanf("%lf", &A[i]) != EOF) { i++; } for (j=2;j<=N;j++){ key = A[j]; /* insert A[j] into the sorted sequence A[1,.....
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:9:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 9 | print("Error! \n Please retype"); | ^~~~~ | pri...
s811704409
p02256
C
#include<stdio.h> int main(void){ int a,b; int x,i,N; scanf("%d%d",&a,&b); if(a<=b){ x=b%a; for(i=1;i<=x;i++){ if(a%i==0)N=i; } } else { x=a%b; for(i=1;i<=x;i++){ if(b%i==0)N=i; } }
main.c: In function 'main': main.c:20:3: error: expected declaration or statement at end of input 20 | } | ^
s710780492
p02256
C
#include<stdio.h> int main(void){ int a,b; int x,i,N; scanf("%d%d",&a,&b); if(a<=b){ x=b%a; for(i=1;i<=x;i++){ if(a%i==0)N=i; } } else { x=a%b; for(i=1;i<=x;i++){ if(b%i==0)N=i; } }
main.c: In function 'main': main.c:20:3: error: expected declaration or statement at end of input 20 | } | ^
s347078203
p02256
C
#include<stdio.h> int main(void){ int a,b; int x,i,N; scanf("%d%d",&a,&b); if(a<=b){ x=b%a; for(i=1;i<=x;i++){ if(a%i==0)N=i; } } else { x=a%b; for(i=1;i<=x;i++){ if(b%i==0)N=i; } }
main.c: In function 'main': main.c:20:3: error: expected declaration or statement at end of input 20 | } | ^
s571535701
p02256
C
#include<stdio.h> int main(void){ int a,b; int x,i,N; scanf("%d%d",&a,&b); if(a<=b){ x=b%a; for(i=1;i<=x;i++){ if(a%i==0 && x%i==0)N=i; } } else { x=a%b; for(i=1;i<=x;i++){ if(b%i==0 && x%i==0)N=i; } }
main.c: In function 'main': main.c:20:3: error: expected declaration or statement at end of input 20 | } | ^
s444948203
p02256
C
#include<iostream> using namespace std; int gcd(int x, int y) { int t; if(x < y) swap(x, y); while(y) t = x % y, x = y, y = t; return x; } int main(){ int m,n; while(cin>>m>>n){ cout<<gcd(m, n)<<endl; } }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s616034595
p02256
C
using System; class Program { static void Main() { string[] input = Console.ReadLine().Split(' '); Console.WriteLine(Solve(int.Parse(input[0]),int.Parse(input[1]))); } static int Solve(int a, int b) { int small,mod; if(a>b){ small=b; mod=a%b; ...
main.c:1:1: error: unknown type name 'using' 1 | using System; | ^~~~~ main.c:3:1: error: unknown type name 'class' 3 | class Program | ^~~~~ main.c:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 4 | { | ^
s984989307
p02256
C
#include<iostream> using namespace std; int gcd(int a, int b){ if(a < b){ int buf = a; a = b; b = buf; } if(a % b == 0)return b; else return gcd(b, a % b); }; int main(){ int a,b; cin >> a; cin >> b; cout << gcd(a,b); return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s120948038
p02256
C
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << __gcd(a,b) << endl; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s749691547
p02256
C
#include<stdio.h> int gcd(int,int); void swap(int, int); int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); } int gcd(a,b){ int r,d; if(a<b){ work=x; x=y; y=work;} while(b>0){ r=a%b; a=b; b=r;} return a; }
main.c: In function 'gcd': main.c:13:5: error: type of 'a' defaults to 'int' [-Wimplicit-int] 13 | int gcd(a,b){ | ^~~ main.c:13:5: error: type of 'b' defaults to 'int' [-Wimplicit-int] main.c:16:6: error: 'work' undeclared (first use in this function) 16 | work=x; | ^~~~ main.c:16:6: no...
s255031868
p02256
C
#include<stdio.h> int main(){ int a,b,work; scanf("%d %d",&a,&b); while(r!=0){ work=a%b; a=b; b=work;} printf("%d\n",a); }
main.c: In function 'main': main.c:6:9: error: 'r' undeclared (first use in this function) 6 | while(r!=0){ | ^ main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
s787846963
p02256
C
#include<stdio.h> main() { int a,b,c,d,e; int j=1; scan("%d%d",&a,&b); while(j < a && j < b) { c=a%j; d=b%j; if(c==0 && d==0){ e=j; } j++; } print("%d\n",e); }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function 'main': main.c:6:3: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scan("%d%d",&a,&b); | ^~~~ | scanf main.c:16:3: error: i...
s489203432
p02256
C
include<stdio.h> int main(){ int a,b,buf; scanf("%d%d", &a, &b); if(a >= b){ while((buf = a % b) != 0){ a = b; b = buf; } printf("%d\n", b); } else { while((buf = b % a) != 0){ b = a; a = buf; } printf("%d\n", a); } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s316742616
p02256
C
#include <stdio.h> main(){ int a,b,c; scanf("%d%d",&a,&b); while(a%b!=0){ c=a%b; a=b; b=c; } printf("%d\n",b); } }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c:14:1: error: expected identifier or '(' before '}' token 14 | } | ^
s736383406
p02256
C
#include<stdio.h> int gcd(int ,int); int swap(int,int); main(){ int a,b; scanf("%d%d",&a,&b); gcd(a,b); printf("%d\n",x); } int gcd(int x, int y){ int n; if(x < y){ n = x; x = y; y = n; } while(y>0){ n = x%y; x = y; y = n; } }
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int] 6 | main(){ | ^~~~ main.c: In function 'main': main.c:13:17: error: 'x' undeclared (first use in this function) 13 | printf("%d\n",x); | ^ main.c:13:17: note: each undeclared identifier is reported only once for each ...
s510294865
p02256
C
#include <stdio.h> void swap(int *, int *); int main(void){ double x, y; double t; scanf("%d%d", &x, &y); if(y>x){ swap(&x, &y); } if(x>=y){ while(y>0){ t = x%y; x = y; y = t; } printf("%d\n", x); } return 0; } void swap(int *x, int *y){ ...
main.c: In function 'main': main.c:9:14: error: passing argument 1 of 'swap' from incompatible pointer type [-Wincompatible-pointer-types] 9 | swap(&x, &y); | ^~ | | | double * main.c:2:11: note: expected 'int *' but argument is of type 'double *' ...
s324931737
p02256
C
#include <stdio.h> int main(void) { int a, b, xy, i, m; scanf("%d %d", &a, &b); /* 整数 x, y について、1 < y < x ならば x と y の最大公約数は y と x%y の 最大公約数に等しい。 ここで a%b は a を b で割った余りである。 */ if(1 < a && 1 < b) { if(a == b) { printf("%d\n", a); return 0; ...
main.c:29:5: error: expected identifier or '(' before 'return' 29 | return 0; | ^~~~~~ main.c:30:1: error: expected identifier or '(' before '}' token 30 | } | ^
s061378639
p02256
C
#include <iostream> using namespace std; int gcd(int a, int b){ int t; if( a < b ){ t = a; a = b; b = t; } while(1){ t = a%b; if(t == 0) return b; a = b; b = t; } return -1; } int main(){ int a,b; cin >> a >> b; cout << gcd(a, b) << ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s217881548
p02256
C
#include<stdio.h> #include<conio.h> int main(void){ int a,b,i,gcd,m; scanf("%d %d",&a,&b); if(a>b) m = a; else m = b; for(i=m;i>=1;i--){ if(a%i==0 && b%i==0){ gcd=i; } } printf("%d",gcd); getch(); return 0;
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s606987054
p02256
C
#include<stdio.h> #include<conio.h> int main(void){ int a,b,i,gcd,m; scanf("%d %d",&a,&b); if(a>b){ m=a; } else m=b; for(i=m;i>=0;i--){ if(a%i==0 && b%i==0){ gcd=i; break; } } printf("%d",i); getch(); return 0; }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s166382858
p02256
C
#include<stdio.h> #include<conio.h> int main(void){ int a,b,i,gcd,m; scanf("%d %d ",&a,&b); if(a>b){ m=a; } else m=b; for(i=m;i>=0;i--){ if(a%i==0 && b%i==0){ gcd=i; break; } } printf("%d \n",i); getch(); return 0; }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s671475519
p02256
C
#include<stdio.h> int main(void){ int a,b,i,gcd,m; scanf("%d %d ",&a,&b); if(a>b){ m=a; } else m=b; for(i=m;i>=0;i--){ if(a%i==0 && b%i==0){ gcd=i; break; } } printf("%d \n",i); return 0; } }
main.c:28:1: error: expected identifier or '(' before '}' token 28 | } | ^
s131744616
p02256
C
#include<stdio.h> int main(void){ int a,b,i,gcd,m; scanf("%d %d ",&a,&b); if(a>b){ m=a; } else m=b; for(i=m;i>=0;i--){ if(a%i==0 && b%i==0){ gcd=i; break; } } printf("%d \n",i); return 0; } }
main.c:28:1: error: expected identifier or '(' before '}' token 28 | } | ^
s333215910
p02256
C++
a, b = map(int, input().split()) def gcd(a, b): big = max(a, b) small = min(a, b) while not big % small == 0: big, small = small, big%small return small print(gcd(a, b))
a.cc:1:1: error: 'a' does not name a type 1 | a, b = map(int, input().split()) | ^
s122337700
p02256
C++
#include<bits/stdc++.h> using namespace std; int calc_gcd(int x,int y){ if(y == 0){ return x; } else{ return calc_gcd(y,x%y); } } int main(){ int x,y; cin >> x >> y; if (x >= y){ cout << calc(x,y) << endl; } else{ cout << calc(y,x) <<...
a.cc: In function 'int main()': a.cc:17:17: error: 'calc' was not declared in this scope 17 | cout << calc(x,y) << endl; | ^~~~ a.cc:20:17: error: 'calc' was not declared in this scope 20 | cout << calc(y,x) << endl; | ^~~~
s669682685
p02256
C++
#include<bits/stdc++.h> using namespace std; int calc_gcd(int x,int y){ if(y == 0){ return x; } else{ return calc_gcd(y,x%y); } } int main(){ int x,y; cin >> x >> y; if (x >= y){ cout << calc(x,y) << endl; } else{ cout << calc(y,x) <<...
a.cc: In function 'int main()': a.cc:17:17: error: 'calc' was not declared in this scope 17 | cout << calc(x,y) << endl; | ^~~~ a.cc:20:17: error: 'calc' was not declared in this scope 20 | cout << calc(y,x) << endl; | ^~~~
s004440540
p02256
C++
x = input() y = input() if x < y: tmp = x x = y y = tmp x_y_divisor = list() y_divisor = list() x_mod_y = x % y for i in range(1,(x_mod_y)+1): if x_mod_y % i == 0: x_y_divisor.append(i) for i in range(1,y+1): if y % i == 0: y_divisor.append(i) x_y_divisor_set = set(x_y_divisor) y_divisor_set = set(y_di...
a.cc:1:1: error: 'x' does not name a type 1 | x = input() | ^
s753750277
p02256
C++
//gcd(x, y) = gcd(y, x%y) #include <iostream> int gcd(int a, int b){ if(a == 0){ return b; } else { return gcd(b, b % a); } } int main() { cin >> a >> b; }
a.cc: In function 'int main()': a.cc:13:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 13 | cin >> a >> b; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked ...
s372799727
p02256
C++
import java.lang.Math.*; import java.util.*; import java.io.Console; import java.nio.file.Paths; import java.io.IOException; import java.io.*; import java.math.*; class test { public static void main(String[] args){ Scanner cin = new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); for(int i=(a<=b)?a:b;...
a.cc:1:1: error: 'import' does not name a type 1 | import java.lang.Math.*; | ^~~~~~ 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.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.c...
s101067409
p02256
C++
import java.util.Scanner; class test { public static int solve(int a,int b) { for(int i=(a<=b)?a:b;i>=1;i--){ if(a%i==0 && b%i==0) return i; } return 1; } public static void main(String[] args){ Scanner cin = new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); System.out.prin...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static int solve(int a,int b) { | ^~~~~~~ | : a....
s161617810
p02256
C++
import java.util.Scanner; class test { public static void main(String[] args){ Scanner cin = new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); System.out.println(solve(a,b)); } public static int solve(int a,int b) { for(int i=(a<=b)?a:b;i>=1;i--){ if(a%i==0 && b%i==0) return i; } ...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:15: error: expected ':' before 'static' 6 | public static void main(String[] args){ | ^~~~~~~ | : a...
s164526125
p02256
C++
public static void main(String args[]) throws Exception { Scanner cin=new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); for(int i=(a<=b)?a:b;i>=1;i--){ if(a%i==0 && b%i==0) System.out.println(i); } }
a.cc:1:1: error: expected unqualified-id before 'public' 1 | public static void main(String args[]) throws Exception | ^~~~~~
s344058847
p02256
C++
import java.io.*; import java.util.*; class test { public static void main(String args[]) { Scanner cin=new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); for(int i=(a<=b)?a:b;i>=1;i--){ if(a%i==0 && b%i==0) System.out.println(i); } } }
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:47:...
s485091023
p02256
C++
import java.io.*; import java.util.*; public class main(String args[]) { Scanner cin=new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); for(int i=(a<=b)?a:b;i>=1;i--){ if(a%i==0 && b%i==0) System.out.println(i); } }
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:41:...
s102232399
p02256
C++
import java.io.*; import java.util.*; class test { public static void main(String args[]) { Scanner cin=new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt(); System.out.println(GCD(a,b)); } public static int GCD(int a, int b) { if (b==0) return a...
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:71:...
s219845814
p02256
C++
int main() { int a, b; cin >> a >> b; int small,gcd; gcd = 1; small = (a > b) ? b : a; //cout << "small : " << small << endl; for (int i = 2; i <= small; i++) { while (a%i == 0 && b%i == 0) { a = a / i; b = b / i; gcd = gcd * i; } } cout << gcd << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope 4 | cin >> a >> b; | ^~~ a.cc:19:9: error: 'cout' was not declared in this scope 19 | cout << gcd << endl; | ^~~~ a.cc:19:24: error: 'endl' was not declared in this scope 19 | ...
s522411674
p02256
C++
#include<jiostream> using namwspace std; int gcd(int a, int b) { c = a % b; a = b; b = c; if c!= 0 return gcd(a, b); else return 1; } int main() { int a, int b; cin >> a >> b; cout << gcd(a, b); return 0; }
a.cc:1:9: fatal error: jiostream: No such file or directory 1 | #include<jiostream> | ^~~~~~~~~~~ compilation terminated.
s799926356
p02256
C++
#include<jiostream> using namwspace std; int gcd(int a, int b) { c = a % b; a = b; b = c; if c!= 0 return gcd(a, b); else return 1; } int main() { int a, int b; cin >> a >> b; cout << gcd(a, b); return 0; }
a.cc:1:9: fatal error: jiostream: No such file or directory 1 | #include<jiostream> | ^~~~~~~~~~~ compilation terminated.
s623679393
p02256
C++
int main() { int a, b, c; cin >> a >> b; while ( b != 0 ) { c = a % b; a = b; b = c; } cout << a; return 0; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope 4 | cin >> a >> b; | ^~~ a.cc:10:9: error: 'cout' was not declared in this scope 10 | cout << a; | ^~~~
s349650015
p02256
C++
#include<iostream> using namespace std; int gcd(int a, int b) { b == 0? return b : return gcd(b, a % b); } int main() { int a, b; cin >> a >> b; a = gcd(a, b); cout << a << endl; return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:5:13: error: expected primary-expression before 'return' 5 | b == 0? return b : return gcd(b, a % b); | ^~~~~~ a.cc:5:12: error: expected ':' before 'return' 5 | b == 0? return b : return gcd(b, a % b); | ^~~~~~~ | ...
s427526263
p02256
C++
#include <iostream> #include <math.h> #include <string> #include <algorithm> #include <set> #include <queue> #include <stack> #include <utility> #include <tuple> using namespace std; const double pi = acos(-1); #define nyan cout<<"(=^•ω•^=)"<<endl; #define int long long #define rep(i,n) for(int i=0;i<n;i++) int gcd(...
a.cc: In function 'long long int gcd(long long int, long long int)': a.cc:21:27: error: expected ';' before '}' token 21 | else return gcd(i,j%i) | ^ | ; 22 | } | ~
s212968731
p02256
C++
#include<stdio.h> int gcd(x,y){ return y?gcd(y,x%y):x; } int main() { int k,k1; scanf("%d%d",&k,&k1); printf("%d\n",gcd(k,k1)); return 0; }
a.cc:2:9: error: 'x' was not declared in this scope 2 | int gcd(x,y){ | ^ a.cc:2:11: error: 'y' was not declared in this scope 2 | int gcd(x,y){ | ^ a.cc:2:12: error: expression list treated as compound expression in initializer [-fpermissive] 2 | int gcd(x,y){ | ...
s740688860
p02256
C++
#include<stdio.h> int gcd(x,y){ return y?gcd(y,x%y):x; } int main() { int k,k1; scanf("%d%d",&k,&k1); printf("%d\n",gcd(k,k1)); }
a.cc:2:9: error: 'x' was not declared in this scope 2 | int gcd(x,y){ | ^ a.cc:2:11: error: 'y' was not declared in this scope 2 | int gcd(x,y){ | ^ a.cc:2:12: error: expression list treated as compound expression in initializer [-fpermissive] 2 | int gcd(x,y){ | ...
s076054597
p02256
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int x,y; while(1){ if(x%y==0)break; x%y=x; x=max(x,y); y=min(x,y); } cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: lvalue required as left operand of assignment 9 | x%y=x; | ~^~
s923076298
p02256
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<gcd(x,y)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:11: error: 'gcd' was not declared in this scope 8 | cout<<gcd(x,y)<<endl; | ^~~
s205915106
p02256
C++
#include<iostream> using namespace std; long long gcd(long long x, long long y){ if x < y swap(x, y) while y > 0 r = x % y x = y y = r return x } int main(){ long long x, y; cin >> x >> y; cout << gcd(x, y) << endl; return 0; }
a.cc: In function 'long long int gcd(long long int, long long int)': a.cc:4:8: error: expected '(' before 'x' 4 | if x < y | ^ | ( a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type] 12 | } | ^
s628579381
p02256
C++
#include<iostream> using namespace std; long long gcd(long long x, long long y){ int r = 0; if(x < y){ swap(x, y); } while(y > 0){ r = x % y x = y y = r } return x } int main(){ long long x, y; cin >> x >> y; cout << gcd(x, y) << endl; return...
a.cc: In function 'long long int gcd(long long int, long long int)': a.cc:9:18: error: expected ';' before 'x' 9 | r = x % y | ^ | ; 10 | x = y | ~ a.cc:13:13: error: expected ';' before '}' token 13 | return x | ...
s131559091
p02256
C++
#include<iostream> using namespace std; int gcd(int x, int y){ int r = 0; if(x < y){ swap(x, y); } while(y > 0){ r = x % y x = y y = r } return x } int main(){ int x, y; cin >> x >> y; cout << gcd(x, y) << endl; return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:9:18: error: expected ';' before 'x' 9 | r = x % y | ^ | ; 10 | x = y | ~ a.cc:13:13: error: expected ';' before '}' token 13 | return x | ^ | ...
s190834006
p02256
C++
#include<iostream> using namespace std; long long gcd(long long x, long long y){ int r = 0; if(x < y){ swap(x, y); } while(y > 0){ r = x % y; x = y; y = r; } return x } int main(){ long long x, y; cin >> x >> y; cout << gcd(x, y) << endl; ret...
a.cc: In function 'long long int gcd(long long int, long long int)': a.cc:13:13: error: expected ';' before '}' token 13 | return x | ^ | ; 14 | } | ~
s594115900
p02256
C++
#include"pch.h" #include<iostream> using namespace std; int main() { int a, b, r; cin >> a >> b; if ((0 == a) || (0 == b)){ r = 0; } r = a % b; while (r != 0) { a = b; b = r; r = a % b; } cout << b << endl; return 0; }
a.cc:1:9: fatal error: pch.h: No such file or directory 1 | #include"pch.h" | ^~~~~~~ compilation terminated.
s068171395
p02256
C++
#include <iostream> using namespace std; int main(){ int x,y; cin >> x >> y; if(x >= y){ gcd(x, y); }else{ gcd(y, x); } } void gcd(int x,int y){ if(x % y != 0){ gcd(y, x % y); }else{ cout << y; } }
a.cc: In function 'int main()': a.cc:10:9: error: 'gcd' was not declared in this scope 10 | gcd(x, y); | ^~~ a.cc:12:9: error: 'gcd' was not declared in this scope 12 | gcd(y, x); | ^~~
s935265103
p02256
C++
#include <iostream> #include <cmath> using namespace std; int gcd(int a, int b) { int n = (a < b) ? a : b; if(a % n == 0 && b & n == 0) { return n; } for(int i = sqrt(n); i > 0; --i) { if{a % i == 0 && b % i == 0) { return i; } } } int main(void) { int a...
a.cc: In function 'int gcd(int, int)': a.cc:12:11: error: expected '(' before '{' token 12 | if{a % i == 0 && b % i == 0) { | ^ | ( a.cc:17:16: error: a function-definition is not allowed here before '{' token 17 | int main(void) { | ^ a.cc:26:2: error:...
s521204516
p02256
C++
#include <iostream> using namespace std; int main(){ int a,b,tmp; cin >> a; cin >> b; while(1){ if(b==0){ cout << a; break; } }else{ tmp = a; a = b; b = tmp % b; } } return 0; }
a.cc: In function 'int main()': a.cc:13:18: error: 'else' without a previous 'if' 13 | }else{ | ^~~~ a.cc: At global scope: a.cc:19:9: error: expected unqualified-id before 'return' 19 | return 0; | ^~~~~~ a.cc:20:1: error: expected declaration before '...
s042962247
p02256
C++
#include <iostream> int gcd( int a, int b ) { if( a < b ) { return gcd( b, a ); } if( b > 0 ) { return gcd( b, a % b ); } return a; } int main() { std::ios::sync_with_stdio( false ); int a = 0, b = 0; std::cin >> a; std::cin.ignore(); std::cin >> b; std::cout << gcd( a, b ) std::endl; }
a.cc: In function 'int main()': a.cc:17:27: error: expected ';' before 'std' 17 | std::cout << gcd( a, b ) std::endl; | ^~~~ | ;
s335578798
p02256
C++
#include<stdio.h> int gcd(int x,int y){ int n n=x; if (y<x){n=y;y=x;} for(int i=n;i>1;i--) if(x%i==0&&y%i==0){d=i;break;} return d } int main() { int x,y,r; r=0; scanf("%d %d",&x,&y); r=gcd(x,y); printf("%d",r); return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:4:1: error: expected initializer before 'n' 4 | n=x; | ^ a.cc:5:10: error: 'n' was not declared in this scope 5 | if (y<x){n=y;y=x;} | ^ a.cc:6:15: error: 'n' was not declared in this scope 6 | for(int i=n;i>1;i--) | ^ ...
s792267940
p02256
C++
#include <iostream> using namespace std; int main(){ int x, y; int a, b, r; int gcd; cin >> x >> y; if(x > y){ a = x; b = y; }else { a = y; b = x; } do{ r = a % b; gcd = a = b; b = r; }while(b != 0); cout << tmp << endl; return 0; }
a.cc: In function 'int main()': a.cc:25:17: error: 'tmp' was not declared in this scope; did you mean 'tm'? 25 | cout << tmp << endl; | ^~~ | tm
s680404256
p02256
C++
#include<stdio.h> int main() { int x,y; scanf("%d %d",&x,&y); int n; for(n=1;n<=x&&n<=y;n++) { ??? int k; if(x%n==0 && y%n==0) k=n; } printf("%d\n",k); return 0; }
a.cc: In function 'int main()': a.cc:10:6: error: expected primary-expression before '?' token 10 | ??? int k; | ^ a.cc:10:7: error: expected primary-expression before '?' token 10 | ??? int k; | ^ a.cc:10:8: error: expected primary-expression before '?' token 10 | ...
s904418382
p02256
C++
#include<stdio.h> int main() { int x,y; scanf("%d %d",&x,&y); int n; for(n=1;n<=x&&n<=y;n++) { ??? int k=1; if(x%n==0 && y%n==0) k=n; } printf("%d\n",k); return 0; }
a.cc: In function 'int main()': a.cc:10:6: error: expected primary-expression before '?' token 10 | ??? int k=1; | ^ a.cc:10:7: error: expected primary-expression before '?' token 10 | ??? int k=1; | ^ a.cc:10:8: error: expected primary-expression before '?' token 10 | ...