submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s945659695
p02256
C
#include <stdio.h> int amari (int x, int y) { int yojo; yojo = x % y; if ((yojo != 0) && (yojo != 1)) { amari (y, yojo); } return y; } int main() { int a, b; scanf ("%d %d", &a &b); printf("%d\n", amari(a, b)); return 0; }
main.c: In function 'main': main.c:22:24: error: invalid operands to binary & (have 'int *' and 'int') 22 | scanf ("%d %d", &a &b); | ~~ ^ | | | int *
s046175058
p02256
C
#include <stdio.h> int main(void) { int i; int x, y; int d, temp; scanf ("%d %d", &x, &y); if (y > x) { ??????temp = y; ??????y = x; ??????x = temp; } d = x%y; while (d != 0) { ??????x = y; ??????y = d; d = x%y; } printf ("%d\n", d); return 0; }
main.c: In function 'main': main.c:13:1: error: expected expression before '?' token 13 | ??????temp = y; | ^ main.c:14:1: error: expected expression before '?' token 14 | ??????y = x; | ^ main.c:15:1: error: expected expression before '?' token 15 | ??????x = temp; | ^ main.c:20:1: error: ex...
s537581808
p02256
C
#include <stdio.h> int main(void) { int i; int x, y; int d, temp; scanf ("%d %d", &x, &y); if (y > x) { ??????temp = y; ??????y = x; ??????x = temp; } d = x%y; while (d != 0) { ??????x = y; ??????y = d; d = x%y; } printf ("%d\n", d); return 0; }
main.c: In function 'main': main.c:11:1: error: expected expression before '?' token 11 | ??????temp = y; | ^ main.c:12:1: error: expected expression before '?' token 12 | ??????y = x; | ^ main.c:13:1: error: expected expression before '?' token 13 | ??????x = temp; | ^ main.c:18:1: error: ex...
s905826011
p02256
C
#include <stdio.h> int main(void){ int x, y, d, i, xy, max; scanf("%d%d", &x, &y); if(y > x){ i = x; x = y; y = i; }y xy = x%y; for(d = 1; d <= y; d++){ if((y%d == 0)&&(xy%d == 0)){ max = d; } } printf("%d\n", max); return 0; }
main.c: In function 'main': main.c:13:5: error: expected ';' before 'xy' 13 | }y | ^ | ; 14 | 15 | xy = x%y; | ~~
s946536468
p02256
C
#include <stdio.h> int main(void){ int x, y, d, i, xy, max; scanf("%d%d", &x, &y); if(y > x){ i = x; x = y; y = i; }y xy = x%y; for(d = 1; d <= y; d++){ if((y%d == 0)&&(xy%d == 0)){ max = d; } } printf("%d", max); return 0; }
main.c: In function 'main': main.c:13:5: error: expected ';' before 'xy' 13 | }y | ^ | ; 14 | 15 | xy = x%y; | ~~
s345804362
p02256
C
#include <stdio.h> #include <stdlib.h> using namespace std; int main(void) { int a, b; scanf("%d %d", &a, &b); int mn; if (a>=b) mn = b; else mn = a; for (int i=mn; i>=1; i--) { if (a%i==0 && b%i==0) { printf("%d\n", i); return 0; } } //printf("...
main.c:4:1: error: unknown type name 'using' 4 | using namespace std; | ^~~~~ main.c:4:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 4 | using namespace std; | ^~~
s300021465
p02256
C
"
main.c:1:1: warning: missing terminating " character 1 | " | ^ main.c:1:1: error: missing terminating " character
s272604439
p02256
C
include<stdio.h> int gcd(int,int); main(){ int a,b; int d; scanf("%d%d",&a,&b); d=gcd(a,b); printf("%d\n",d); } int gcd(int a,int b){ int r; if x<y; swap(x,y); r=x%y; x=y; y=r; return x; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:8:1: error: implicit declaration of function 'scanf' [-Wimplici...
s254715704
p02256
C
include<stdio.h> int gcd(int,int); main(){ int a,b; int d; scanf("%d%d",&a,&b); d=gcd(a,b); printf("%d\n",d); } int gcd(int x,int y){ int r; if x<y; swap(x,y); r=x%y; x=y; y=r; return x; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:8:1: error: implicit declaration of function 'scanf' [-Wimplici...
s250599217
p02256
C
include<stdio.h> int main() { int a, b, n, m; scanf("%d%d", &a, &b); if(a < b) n = a; else n = b; for(m = n; m > 0; m--) { if(a % m == 0 && b % m == 0) break; } printf("%d\n", m); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s341460640
p02256
C
if(x < y){ z = x; x = y; y = z; } while( y > 0 ){ r = x % y; x = y; y = r; } printf("%d\n" x); return 0; }
main.c:2:3: error: expected identifier or '(' before 'if' 2 | if(x < y){ | ^~ main.c:7:3: error: expected identifier or '(' before 'while' 7 | while( y > 0 ){ | ^~~~~ main.c:13:10: error: expected declaration specifiers or '...' before string constant 13 | printf("%d\n" x); | ...
s229439246
p02256
C
#include<stdio.h> int main(){ int x.y,m,n,k; scanf("%d%d",&x,&y); if(x>=y){ m=x; n=y; } else{ m=y; n=x; } while(n!=0){ k=n; n=m%n; m=k; } printf("%d\n",m); return 0; }
main.c: In function 'main': main.c:3:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 3 | int x.y,m,n,k; | ^ main.c:3:6: error: expected expression before '.' token main.c:3:9: error: 'm' undeclared (first use in this function) 3 | int x.y,m,n,k; | ^ main.c:3:...
s727585463
p02256
C
#include <stdio.h> int main(){ int x,y,a=0,i,temp=0; scanf("%d %d",&x,&y); if(x<y){ temp=y; y = x; x = temp; } a = x % y; white(r !=0){ x = y; b = a; a = x%y; } printf("%d\n",y); return 0; }
main.c: In function 'main': main.c:13:3: error: implicit declaration of function 'white'; did you mean 'fwrite'? [-Wimplicit-function-declaration] 13 | white(r !=0){ | ^~~~~ | fwrite main.c:13:9: error: 'r' undeclared (first use in this function) 13 | white(r !=0){ | ^ main.c:13:...
s005559055
p02256
C
#include <stdio.h> int main(){ int x,y,a=0,i,temp=0; scanf("%d %d",&x,&y); if(x<y){ temp=y; y = x; x = temp; } a = x % y; white(a!=0){ x = y; b = a; a = x%y; } printf("%d\n",y); return 0; }
main.c: In function 'main': main.c:13:3: error: implicit declaration of function 'white'; did you mean 'fwrite'? [-Wimplicit-function-declaration] 13 | white(a!=0){ | ^~~~~ | fwrite main.c:13:14: error: expected ';' before '{' token 13 | white(a!=0){ | ^ | ...
s689443995
p02256
C
void swap(int *x, int *y) { int tmp; tmp = *x; *x = *y; *y = tmp; }
/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
s799532320
p02256
C
#include <stdio.h> int main(){ int x,y,work,i,zan; scanf("%d %d",&x,&y); if(x<y){ work=x; x=y; y=work; } zan=x%y; while(zan!=0){ x=y; y=zan; zan=x%y; } printf("%d"\n,y); }
main.c: In function 'main': main.c:20:14: error: stray '\' in program 20 | printf("%d"\n,y); | ^ main.c:20:14: error: expected ')' before 'n' 20 | printf("%d"\n,y); | ~ ^~ | )
s831411898
p02256
C
void swap(int *x, int *y) { int tmp; tmp = *x; *x = *y; *y = tmp; }
/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
s918292702
p02256
C
#include <stdio.h> #include <math.h> int gcd(int,int); int main(){ int x,y,r; scanf("%d%d",&x,&y); if(x<y)swap(x,y); while(y>0){ r = x%y; x = y; y = r; } printf("%d",x); return 0; }
main.c: In function 'main': main.c:7:10: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 7 | if(x<y)swap(x,y); | ^~~~
s909455789
p02256
C
void swap(int *x, int *y) { int tmp; tmp = *x; *x = *y; *y = tmp; }
/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
s417250803
p02256
C
include <stdio.h> /*147 into x, 105 into y*/ #define MAX 10000000000 int gcd(int,int); int main(){ int x,y; int d,n; int tmp,ans; scanf("%d %d",&x,&y); if(x <= 0 || MAX < y){ return 0; } ans = gcd(x,y); printf("%d\n",ans); return 0; } int gcd(int x,int y){ int tmp; int r; if(x < y){ tm...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ main.c: In function 'main': main.c:13:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 13 | scanf("%d %d",&x,&y); | ^~~~~ main.c:1:1: note: in...
s468388882
p02256
C
#include <stdio.h> int main(){ int a,b,m,n; if(a>=b){ m=a; n=b; } else { m=b; n=a; } while(n!=0){ k=n; n=m%n; m=k; } return 0; }
main.c: In function 'main': main.c:16:5: error: 'k' undeclared (first use in this function) 16 | k=n; | ^ main.c:16:5: note: each undeclared identifier is reported only once for each function it appears in
s475151155
p02256
C
#include <stdio.h> int gcd(int,int); int main(){ int x,y; scanf("%d %d",&x,&y); printf("%d \n",gcd(x,y)); return 0; } int gcd(int x,int y){ int z,i; for(i=0;i<r;i++){ z=y; y = x%y; x=z; if(y==0) break; } return x; }
main.c: In function 'gcd': main.c:15:13: error: 'r' undeclared (first use in this function) 15 | for(i=0;i<r;i++){ | ^ main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
s033674040
p02256
C
#include<stdio.h> int main() { int d, x, y; scanf("%d%d", &x, &y); while(1>x || y > (int)pow(10.0,9.0)){ printf("Warning, x>=1,y<=10^9\n"); scanf("%d%d", &x, &y); } if(x<y) x^=y^=x^=y; d=x%y; while(d!=1){ if(d==0){ printf("%d\n", y); break; } x=y, y=d; d=x%y; } ...
main.c: In function 'main': main.c:8:25: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration] 8 | while(1>x || y > (int)pow(10.0,9.0)){ | ^~~ main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow' 1 | #include<stdio.h> +++ |+#include <...
s440996027
p02256
C
#include<stdio.h> #include<math.h> int main() { int d, x, y; scanf("%d%d", &x, &y); while(1>x || y > (int)pow(10.0,9.0)){ printf("Warning, x>=1,y<=10^9\n"); scanf("%d%d", &x, &y); } if(x<y) x^=y^=x^=y; d=x%y; while(d!=1){ if(d==0){ printf("%d\n", y); break; } x=y, y=d...
main.c: In function 'main': main.c:27:3: error: expected declaration or statement at end of input 27 | return 0; | ^~~~~~
s790006390
p02256
C
#include<stdio.h> #include<math.h> int main() { int d, x, y; scanf("%d%d", &x, &y); while(1>x || y > (int)pow(10.0,9.0)){ printf("Warning, x>=1,y<=10^9\n"); scanf("%d%d", &x, &y); } if(x<y) x^=y^=x^=y; d=x%y; while(d!=1){ if(d==0){ printf("%d\n", y); break; } x=y, y=d...
main.c: In function 'main': main.c:27:3: error: expected declaration or statement at end of input 27 | return 0; | ^~~~~~
s488057025
p02256
C
#include <stdio.h> int main(void){ int x; int y; int i; scanf("%d%d",x,y); if(x>y){ int max=x; for(i=0;i<x;i++){ if(x%max==0&&y%max==){ printf("%d",max); break; } max--; } }else{ int max=y; for(i=0;i<x;i++){ if(x%max==0&&y%max==){ printf("%d",max); ...
main.c: In function 'main': main.c:11:27: error: expected expression before ')' token 11 | if(x%max==0&&y%max==){ | ^ main.c:20:27: error: expected expression before ')' token 20 | if(x%max==0&&y%max==){ | ^
s090009341
p02256
C
#include <stdio.h> int main(void){ int x; int y; int i; scanf("%d %d",&x,&y); if(x>y){ int max=y; for(max<0;max--;){ if(x%max==0&&y%max==0){ printf("%d\n",max); break; } } }else{ int max=x; for(max<0;max--;){ if(x%max==0&&y%max==0){ printf("%d\n...
main.c: In function 'main': main.c:24:6: error: stray '#' in program 24 | }#include <stdio.h> | ^ main.c:24:7: error: 'include' undeclared (first use in this function) 24 | }#include <stdio.h> | ^~~~~~~ main.c:24:7: note: each undeclared identifier is reported only once for each fun...
s346848403
p02256
C
#include<stdio.h> ?? int main(void){ ????int x,y,t; ?? ????scanf("%d %d",&x,&y); ?? ????while(1){ ??????if(x>=y) t=x%y; ??????else t=y%x; ?? ??????if(t==0) break; ??????else {x=y; ??????????????????y=t; ??????} ????} ????printf("%d\n",y); ???? ????return 0; }
main.c:2:1: error: expected identifier or '(' before '?' token 2 | ?? | ^
s817893321
p02256
C
#include<stdio.h> ?? int main(){ ????????int x, y, min, max, rem; ?? ????????scanf("%d %d", &x, &y); ?? ????????if(x == y){ ????????????????printf("%d\n", x); ????????????????return 0; ????????} ?? ????????if(x < y){ ????????????????min = x; ????????????????max = y; ????????}else{ ????????????????min = y; ?????????????...
main.c:2:1: error: expected identifier or '(' before '?' token 2 | ?? | ^
s888394059
p02256
C
#include<stdio.h> ?? int main(){ ????????int x, y, min, max, rem; ?? ????????scanf("%d %d", &x, &y); ?? ????????if(x == y){ ????????????????printf("%d\n", x); ????????????????return 0; ????????} ?? ????????if(x < y){ ????????????????min = x; ????????????????max = y; ????????}else{ ????????????????min = y; ?????????????...
main.c:2:1: error: expected identifier or '(' before '?' token 2 | ?? | ^
s235893224
p02256
C
#include<stdio.h> int main(void){ long long int x,y,temp,i,div; if( x > y){temp=x;x=y;y=temp;} for(i=0;i<x-1;i++){ if( x % i)==0 &&(y%i==0){div=i;} } printf("%lld\n",div); return 0; }
main.c: In function 'main': main.c:6:27: error: expected expression before '==' token 6 | if( x % i)==0 &&(y%i==0){div=i;} | ^~
s875917827
p02256
C
#include <iostream> using namespace std; int main() { int x; int y; int big; int small; int tmp; scanf("%d%d",&x,&y); if(x>y){ big = x; small = y; }else{ big = y; small = x; } while(small != 0){ tmp = small; small = big % small; big = tmp; } printf("%d",big); return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s206215098
p02256
C
#include <stdio.h> int main(){ int a,b,x,y,z=1,c; scanf("%d%d",&x,&y); if(x-y >= 0){ a=x; b=y; } else if { b=x; a=y; } while(z!=0){ z=a%b; a=b; b=z; } c=a; printf("%d\n",c); return 0; }
main.c: In function 'main': main.c:12:11: error: expected '(' before '{' token 12 | else if { | ^ | (
s953671503
p02256
C
def gcd(a,b): if a < b: a,b = b,a while b != 0: a,b = b,a%b return a a,b = map(int,raw_input().split()) print gcd(a,b)
main.c:1:1: error: unknown type name 'def' 1 | def gcd(a,b): | ^~~ main.c: In function 'gcd': main.c:1:13: error: expected declaration specifiers before ':' token 1 | def gcd(a,b): | ^ main.c:1:5: error: type of 'a' defaults to 'int' [-Wimplicit-int] 1 | def gcd(a,b): | ^~~...
s549930198
p02256
C
#include <stdio.h> int main() { int x, y, z; scanf("%d %d", &x, &y); if(x > y){ do{ z = y y = x%y }while(y != 0); }else{ do{ z = x x = y%x; }while(x != 0); } printf("%d\n", z); return 0; }
main.c: In function 'main': main.c:11:12: error: expected ';' before 'y' 11 | z = y | ^ | ; 12 | y = x%y | ~ main.c:16:12: error: expected ';' before 'x' 16 | z = x | ^ | ; 17 | x = y%x; | ...
s808285974
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[], b_divisor[]; int i, j scanf("%d %d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisior += [a/i]; } } for(i = 1; i < b; i++){ if(b%i == 0){ b_divisior += [b/i]; }...
main.c: In function 'main': main.c:5:9: error: array size missing in 'a_divisor' 5 | int a_divisor[], b_divisor[]; | ^~~~~~~~~ main.c:5:22: error: array size missing in 'b_divisor' 5 | int a_divisor[], b_divisor[]; | ^~~~~~~~~ main.c:8:5: error: expected '=', ','...
s639809879
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000], b_divisor[1000000000]; int i, j scanf("%d %d", &a, &b); for(i = 1; i < a; i = i + 1){ if(a%i == 0){ a_divisior += [a/i]; } } for(i = 1; i < b; i = i + 1){ if(b%i == 0){ ...
main.c: In function 'main': main.c:8:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 8 | scanf("%d %d", &a, &b); | ^~~~~ main.c:12:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'? 12 | a_divisior += [a/i]; | ...
s334725565
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000], b_divisor[1000000000]; int i, j; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisior += [a/i]; } } for(i = 1; i < b; i++){ if(b%i == 0){ b_divis...
main.c: In function 'main': main.c:12:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'? 12 | a_divisior += [a/i]; | ^~~~~~~~~~ | a_divisor main.c:12:13: note: each undeclared identifier is reported only once for each function it...
s828598622
p02256
C
#include<stdio.h> int main() int x, y, gcd, box; scanf("%d %d", &x, &y); while(1){ if (x < y){ box = x; x = y; y = box; } if ((x %= y) == 0){ break; } x %= y; } printf("%d\n", x); }
main.c: In function 'main': main.c:5:3: error: expected declaration specifiers before 'scanf' 5 | scanf("%d %d", &x, &y); | ^~~~~ main.c:6:3: error: expected declaration specifiers before 'while' 6 | while(1){ | ^~~~~ main.c:17:3: error: expected declaration specifiers before 'printf' 17 ...
s082941151
p02256
C
#include <stdio.h> int main(){ int x, y, z; scanf("%d %d", &x, &y); if(x < y) z = x; x = y; y = z; } while(y > 0){ z = x%y; x = y; y = z; } printf("%d\n", x); return 0; }
main.c:15:3: error: expected identifier or '(' before 'while' 15 | while(y > 0){ | ^~~~~ main.c:21:10: error: expected declaration specifiers or '...' before string constant 21 | printf("%d\n", x); | ^~~~~~ main.c:21:18: error: unknown type name 'x' 21 | printf("%d\n", x); | ...
s653642962
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000], b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisior[count] = [a/i]; count = count + 1; } } for(i = 1...
main.c: In function 'main': main.c:13:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'? 13 | a_divisior[count] = [a/i]; | ^~~~~~~~~~ | a_divisor main.c:13:13: note: each undeclared identifier is reported only once for each funct...
s502850339
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000], b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisior[count] = [a/i]; count = count + 1; } } for(i = 1...
main.c: In function 'main': main.c:13:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'? 13 | a_divisior[count] = [a/i]; | ^~~~~~~~~~ | a_divisor main.c:13:13: note: each undeclared identifier is reported only once for each funct...
s816485889
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisior[count] = [a/i]; count = count + 1; } } f...
main.c: In function 'main': main.c:14:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'? 14 | a_divisior[count] = [a/i]; | ^~~~~~~~~~ | a_divisor main.c:14:13: note: each undeclared identifier is reported only once for each funct...
s726567492
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisor[count] = [a/i]; count = count + 1; } } fo...
main.c: In function 'main': main.c:14:32: error: expected expression before '[' token 14 | a_divisor[count] = [a/i]; | ^ main.c:21:26: error: expected expression before '[' token 21 | b_divisor += [b/i]; | ^ main.c:40:1: e...
s006357532
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisor[count] = [a/i]; count = count + 1; } } fo...
main.c: In function 'main': main.c:14:32: error: expected expression before '[' token 14 | a_divisor[count] = [a/i]; | ^ main.c:21:26: error: expected expression before '[' token 21 | b_divisor += [b/i]; | ^
s201191249
p02256
C
#include <stdio.h> int main(void) { int a, b, c; int j = 1; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 1; i <= j; i++){ if(d < c[i]){ d = c[i] ...
main.c: In function 'main': main.c:11:6: error: 'd' undeclared (first use in this function) 11 | d = b; | ^ main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in main.c:18:9: error: subscripted value is neither array nor pointer nor vector 18 | ...
s004751861
p02256
C
#include <stdio.h> int main(void) { int a, b, c; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0 i <= j; i++){ if(d < c[i]){ d = c[i]; ...
main.c: In function 'main': main.c:11:6: error: 'd' undeclared (first use in this function) 11 | d = b; | ^ main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in main.c:18:9: error: subscripted value is neither array nor pointer nor vector 18 | ...
s917070143
p02256
C
#include<stdio.h> int main(void) { int a, b , x, i, ans = 1; scanf("%d %d"&a, &b); if(a > b) { x = a; a = b; b = x; } i = 2; while (i <= a) { if (a % i == 0 && b % i == 0) { a /= i; b /= i; ans *= i; i = 1; } i++; } printf("%d\n",ans); return 0; }
main.c: In function 'main': main.c:6:16: error: invalid operands to binary & (have 'char *' and 'int') 6 | scanf("%d %d"&a, &b); | ~~~~~~~^ | | | char *
s651555852
p02256
C
#include <stdio.h> int main(void) { int a, b, c; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0; i <= j; i++){ if(d < c[i]){ d = c[i];...
main.c: In function 'main': main.c:11:6: error: 'd' undeclared (first use in this function) 11 | d = b; | ^ main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in main.c:18:9: error: subscripted value is neither array nor pointer nor vector 18 | ...
s176048272
p02256
C
#include<stdio.h> int main(void) { int a, b , x, i, ans; scanf("%d %d"&a, &b); if(a > b) { x = a; a = b; b = x; } ans = 1; i = 2; while (i <= a) { if (a % i == 0 && b % i == 0) { a /= i; b /= i; ans *= i; i = 1; } i++; } printf("%d\n",ans); return 0;...
main.c: In function 'main': main.c:6:16: error: invalid operands to binary & (have 'char *' and 'int') 6 | scanf("%d %d"&a, &b); | ~~~~~~~^ | | | char *
s465713214
p02256
C
#include <stdio.h> int main(void) { int a, b; int c[100]; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0; i <= j; i++){ if(d < c[i]){ ...
main.c: In function 'main': main.c:12:6: error: 'd' undeclared (first use in this function) 12 | d = b; | ^ main.c:12:6: note: each undeclared identifier is reported only once for each function it appears in main.c:24:7: error: 'i' undeclared (first use in this function) 24 | for(i = 0; i <= j; ...
s156342398
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisor[count] = a/i; count = count + 1; } } for(...
main.c: In function 'main': main.c:21:26: error: expected expression before '[' token 21 | b_divisor += [b/i]; | ^
s990817056
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisor[count] = [a/i]; count = count + 1; } } fo...
main.c: In function 'main': main.c:14:32: error: expected expression before '[' token 14 | a_divisor[count] = [a/i]; | ^ main.c:21:23: error: assignment to expression with array type 21 | b_divisor += b/i; | ^~
s660271594
p02256
C
#include <stdio.h> int main(void) { int a, b, d; int c[100]; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0; i <= j; i++){ if(d < c[i]){ ...
main.c: In function 'main': main.c:24:7: error: 'i' undeclared (first use in this function) 24 | for(i = 0; i <= j; i++){ | ^ main.c:24:7: note: each undeclared identifier is reported only once for each function it appears in
s807179956
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d%d", &a, &b); for(i = 1; i < a; i++){ if(a%i == 0){ a_divisor[count] = a/i; count = count + 1; } } count...
main.c: In function 'main': main.c:19:13: error: expected expression before ';' token 19 | count = ; | ^
s736869777
p02256
C
#include <stdio.h> int main(void) { int a, b; int d = 0; int c[100]; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0; i <= j; i++){ if(d ...
main.c: In function 'main': main.c:25:7: error: 'i' undeclared (first use in this function) 25 | for(i = 0; i <= j; i++){ | ^ main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in
s708845202
p02256
C
#include<stdio.h> int main(void) { int a, b , x, i, ans; scanf("%d %d"&a, &b); if(a > b) { x = a; a = b; b = x; } ans = 1; i = 2; while (i <= a) { if (a % i == 0 && b % i == 0) { a = a / i; b = b / i; ans = ans * i; i = 1; } i++; } printf("%d\n",ans); ...
main.c: In function 'main': main.c:6:16: error: invalid operands to binary & (have 'char *' and 'int') 6 | scanf("%d %d"&a, &b); | ~~~~~~~^ | | | char *
s728266836
p02256
C
#include <stdio.h> int main(void) { int a, b; int d = 0; int c[100]; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i <= a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0; i < j; i++){ if(d <...
main.c: In function 'main': main.c:25:7: error: 'i' undeclared (first use in this function) 25 | for(i = 0; i < j; i++){ | ^ main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in
s359860390
p02256
C
#include <stdio.h> int main(void) { int a, b; int d = 0; int c[100]; int j = 0; scanf("%d %d", &a, &b); if(a < b){ d = b; b = a; a = b; } for (int i = 1; i < a; i++) { if(a % i == 0 && b % i == 0){ c[j] = i; j = j + 1; } } for(i = 0; i < j; i++){ if(d < ...
main.c: In function 'main': main.c:25:7: error: 'i' undeclared (first use in this function) 25 | for(i = 0; i < j; i++){ | ^ main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in
s922369555
p02256
C
#include <stdio.h> int main(void){ int x,y,z,a,b; scanf("%d,%d",&x,&y); if(x>=y){ z=x%y; a=y%z; if(y%a) } else{ z=y%x; a=x%z; } printf("%d\n",a); return 0; }
main.c: In function 'main': main.c:13:1: error: expected expression before '}' token 13 | } | ^
s048370498
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count = 0; scanf("%d %d", &a, &b); for(i = 1; i =< a; i++){ if(a%i == 0){ a_divisor[count] = a/i; count = count + 1; } } ...
main.c: In function 'main': main.c:12:19: error: expected expression before '<' token 12 | for(i = 1; i =< a; i++){ | ^ main.c:20:19: error: expected expression before '<' token 20 | for(i = 1; i =< b; i++){ | ^
s750976547
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count_a, count_b; scanf("%d %d", &a, &b); count _a = 0; for(i = 1; i <= a; i++){ if(a%i == 0){ a_divisor[count] = a/i; count_a = count_...
main.c: In function 'main': main.c:12:5: error: unknown type name 'count' 12 | count _a = 0; | ^~~~~ main.c:15:23: error: 'count' undeclared (first use in this function); did you mean 'count_b'? 15 | a_divisor[count] = a/i; | ^~~~~ | ...
s344302316
p02256
C
#include <stdio.h> int main() { int a, b, ans; int a_divisor[1000000000]; int b_divisor[1000000000]; int i, j; int count_a, count_b; scanf("%d %d", &a, &b); count _a = 0; for(i = 1; i <= a; i++){ if(a%i == 0){ a_divisor[count] = a/i; count_a = coun...
main.c: In function 'main': main.c:12:5: error: unknown type name 'count' 12 | count _a = 0; | ^~~~~ main.c:15:23: error: 'count' undeclared (first use in this function); did you mean 'count_b'? 15 | a_divisor[count] = a/i; | ^~~~~ | ...
s948710288
p02256
C
#include<stdio.h> int main() { int x, y, i, j; scanf("%d %d", &x, &y); if(x > y){ for(i=x; i>=1; i--){ if(x%i == 0) } for(j=x; j>=1; j--){ if(y%j == 0) } if(i == j){ printf("%d\n", i); return; } } else if(x < y){ for(i=y; i...
main.c: In function 'main': main.c:12:7: error: expected expression before '}' token 12 | } | ^ main.c:15:7: error: expected expression before '}' token 15 | } | ^ main.c:18:10: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 18 | r...
s787175526
p02256
C
#include<stdio.h> int main() { int x, y, i, j; scanf("%d %d", &x, &y); if(x > y) for(i=x; i>=1; i--) if(x%i == 0){ j = i; for(j=i; j>=1; j--) if(y%j == 0){ printf("%d\n", j); return; } } els...
main.c: In function 'main': main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 16 | return; | ^~~~~~ main.c:3:5: note: declared here 3 | int main() | ^~~~ main.c:27:19: error: 'return' with no value, in function retu...
s247210513
p02256
C
#include<stdio.h> int main() { int x, y, i, j; scanf("%d %d", &x, &y); if(x > y) for(i=x; i>=1; i--){ if(x%i == 0){ j = i; for(j=i; j>=1; j--){ if(y%j == 0){ printf("%d\n", j); return; } } ...
main.c: In function 'main': main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 16 | return; | ^~~~~~ main.c:3:5: note: declared here 3 | int main() | ^~~~ main.c: At top level: main.c:23:4: error: expected identifier...
s732679624
p02256
C
#include<stdio.h> int main() { int x, y, i, j; scanf("%d %d", &x, &y); if(x > y) for(i=x; i>=1; i--){ if(x%i == 0){ j = i; for(j=i; j>=1; j--){ if(y%j == 0){ printf("%d\n", j); return; } } ...
main.c: In function 'main': main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 16 | return; | ^~~~~~ main.c:3:5: note: declared here 3 | int main() | ^~~~ main.c: At top level: main.c:23:4: error: expected identifier...
s236401579
p02256
C
#include<stdio.h> int main() { int x, y, i, j; scanf("%d %d", &x, &y); if(x > y) for(i=1; i<=x; i++){ if(y%i == 0){ j = i; for(j=i; j>=1; j--){ if(x%j == 0){ printf("%d\n", j); return; } } ...
main.c: In function 'main': main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 16 | return; | ^~~~~~ main.c:3:5: note: declared here 3 | int main() | ^~~~ main.c: At top level: main.c:23:4: error: expected identifier...
s331684368
p02256
C
#include<stdio.h> int main() { int x, y, i, j; scanf("%d %d", &x, &y); if(x > y) for(i=1; i<=x; i++){ if(y%i == 0){ j = i; for(j=i; j<=x; j++){ if(x%j == 0){ printf("%d\n", j); return; } } ...
main.c: In function 'main': main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 16 | return; | ^~~~~~ main.c:3:5: note: declared here 3 | int main() | ^~~~ main.c: At top level: main.c:23:4: error: expected identifier...
s010655617
p02256
C
#include<stdio.h> int main() { int x, y, i; scanf("%d %d", &x, &y); if(x >= y){ for(i=y; i>=1; i--){ if(y%i == 0){ if(x%i == 0){ printf("%d\n", i); return 0; } } } }
main.c: In function 'main': main.c:18:4: error: expected declaration or statement at end of input 18 | } | ^
s079277657
p02256
C
#include<stdio.h> int main() { int x, y, i; scanf("%d %d", &x, &y); else if(x > y){ for(i=x%y; i>=1; i--){ if((x%y)%i == 0){ if(y%i == 0){ printf("%d\n", i); return 0; } } } } else if(x < y){ for(i=y%x; i>=1; i-...
main.c: In function 'main': main.c:9:4: error: 'else' without a previous 'if' 9 | else if(x > y){ | ^~~~
s679546943
p02256
C
#include<stdio.h> int main() { int x, y, i, X, Y; scanf("%d %d", &x, &y); else if(x > y){ X = x%y; for(i=X; i>=1; i--){ if(X%i == 0){ if(y%i == 0){ printf("%d\n", i); return 0; } } } } else if(x < y){ Y =...
main.c: In function 'main': main.c:9:4: error: 'else' without a previous 'if' 9 | else if(x > y){ | ^~~~
s687466956
p02256
C
#include <stdio.h> #define NUM 100000 int main(void) { int a,b; int gcd; int i; int j = 0; int k = 0; int c[NUM]; int d[NUM]; scanf("%d %d", &a, &b); for(i = 1; i < a; i++) { if(a%i == 0) { c[j] = i; j = j + 1; } } for(i = 1; i < b; i++) { if(b%i == 0) { d[k] = i; ...
main.c: In function 'main': main.c:32:11: error: 'l' undeclared (first use in this function) 32 | for(l = 0; l < k; l++) { | ^ main.c:32:11: note: each undeclared identifier is reported only once for each function it appears in
s883463986
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); gcd(x, y) if x < y swap(x, y); while y > 0 r = x % y; x = y; y = r; return x; printf("%d\n",r); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration] 9 | gcd(x, y) | ^~~ main.c:9:18: error: expected ';' before 'if' 9 | gcd(x, y) | ^ | ; 10 | if x < y ...
s972941490
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); gcd(x, y); if x < y swap(x, y); while y > 0 r = x % y; x = y; y = r; return x; printf("%d\n",r); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration] 9 | gcd(x, y); | ^~~ main.c:10:16: error: expected '(' before 'x' 10 | if x < y | ^ | ( main.c:12:19: error: expected...
s023490619
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); gcd(x, y); if (x < y){ swap(x, y); while y > 0 r = x % y; x = y; y = r; return x; } printf("%d\n",r); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration] 9 | gcd(x, y); | ^~~ main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 11 | swap(x, y); | ...
s902533223
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); gcd(x, y); if (x < y){ swap(x, y); while (y > 0){ r = x % y; x = y; y = r; return x; } } printf("%d\n",r); ...
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration] 9 | gcd(x, y); | ^~~ main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 11 | swap(x, y); | ...
s356164281
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); gcd(x, y); if (x < y){ swap(x, y); while (y > 0){ r = x % y; x = y; y = r; return x; } } printf("%d\n",r); ...
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration] 9 | gcd(x, y); | ^~~ main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 11 | swap(x, y); | ...
s372493456
p02256
C
#include <stdio.h> int main(void) { int x,y,r,gcd,swap; scanf("%d %d",&x,&y); gcd(x, y); if (x < y){ swap(x, y); while (y > 0){ r = x % y; x = y; y = r; return x; } } printf("%d...
main.c: In function 'main': main.c:9:9: error: called object 'gcd' is not a function or function pointer 9 | gcd(x, y); | ^~~ main.c:5:15: note: declared here 5 | int x,y,r,gcd,swap; | ^~~ main.c:11:16: error: called object 'swap' is not a function or function point...
s457426494
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); gcd(x, y); if (x < y){ swap(x, y); while (y > 0){ r = x % y; x = y; y = r; return x; } } printf("%d\n",r); ...
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration] 9 | gcd(x, y); | ^~~ main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 11 | swap(x, y); | ...
s796646845
p02256
C
#include <stdio.h> int main(void) { int x,y,r; scanf("%d %d",&x,&y); if (x < y){ swap(x, y); while (y > 0){ r = x % y; x = y; y = r; return x; } } printf("%d\n",r); return 0; }
main.c: In function 'main': main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 11 | swap(x, y); | ^~~~
s966946206
p02256
C
#include <stdio.h> int main(void) { int x,y,r,s; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } s = x % y; while(s! = 0){ x = y; y = r; s = x % y; } printf("%d\n",y); return 0 }
main.c: In function 'main': main.c:16:16: error: expected ')' before '!' token 16 | while(s! = 0){ | ~ ^ | ) main.c:24:14: error: expected ';' before '}' token 24 | return 0 | ^ | ; 25 | } | ~
s193777145
p02256
C
#include <stdio.h> int main(void) { int x,y,r,s; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } s = x % y; while(s != 0){ x = y; y = r; s = x % y; } printf("%d\n",y); return 0 }
main.c: In function 'main': main.c:24:14: error: expected ';' before '}' token 24 | return 0 | ^ | ; 25 | } | ~
s348042835
p02256
C
#include <stdio.h> int main(void) { int x,y,r,s; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } s = x % y; while(s != 0){ x = y; y = r; s = x % y; } printf("%d\n",y); return 0 }
main.c: In function 'main': main.c:24:14: error: expected ';' before '}' token 24 | return 0 | ^ | ; 25 | } | ~
s063530257
p02256
C
#include <stdio.h> int main(void) { int x,y,r,s; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } s = x % y; while(s != 0){ x = y; y = r; s = x % y; } printf("%d\n",y); return 0 }
main.c: In function 'main': main.c:24:14: error: expected ';' before '}' token 24 | return 0 | ^ | ; 25 | } | ~
s878679814
p02256
C
#include <stdio.h> int main(){ int x, y, r, tmp; scanf("%d %d", &x, &y); if (a < b){ tmp = x; x = y; y = tmp; } r = x % y; while (r != 0){ x = y; y = r; r = x % y; } printf("%d\n", y); return 0; }
main.c: In function 'main': main.c:9:8: error: 'a' undeclared (first use in this function) 9 | if (a < b){ | ^ main.c:9:8: note: each undeclared identifier is reported only once for each function it appears in main.c:9:12: error: 'b' undeclared (first use in this function) 9 | if (a < b){ ...
s527410188
p02256
C
#include<stdio.h> int main(void) { int x, y,tmp; scanf("%d %d", &x, &y); if(x < y){ tmp = x; x = y; y = tmp; } r = x % y; while(r!=0){ x = y; y = r; r = x % y; } printf("%d\n", y); return 0; }
main.c: In function 'main': main.c:20:2: error: 'r' undeclared (first use in this function) 20 | r = x % y; | ^ main.c:20:2: note: each undeclared identifier is reported only once for each function it appears in
s208991033
p02256
C
#include <stdio.h> int main(void) { int x,y,r,s; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } s = x % y; while(s != 0){ x = y; y = r; s = x % y; } printf("%d\n",y); return 0 }
main.c: In function 'main': main.c:24:14: error: expected ';' before '}' token 24 | return 0 | ^ | ; 25 | } | ~
s510886013
p02256
C
#include<stdio.h> int main(void) { int x, y, z, tmp; scanf("%d %d", &x, &y); if(x < y){ tmp = x; x = y; y = tmp; } z = x % y; while(z!=0){ x = y; y = r; z = x % y; } printf("%d\n", y); return 0; }
main.c: In function 'main': main.c:26:7: error: 'r' undeclared (first use in this function) 26 | y = r; | ^ main.c:26:7: note: each undeclared identifier is reported only once for each function it appears in
s170961413
p02256
C
#include<stdio.h> int main (){ int x,y,d=0; scanf("%d %d ",&x,%y); if(x>y){ while(d>0;d++){ if(x/d==0&&x/y%d==0) break; } printf("%d",d); } else{ while(d>0;d++){ if(x/d==0&&x/y%d==0) break; } printf("%d",d); }
main.c: In function 'main': main.c:5:19: error: expected expression before '%' token 5 | scanf("%d %d ",&x,%y); | ^ main.c:9:11: error: expected ')' before ';' token 9 | while(d>0;d++){ | ~ ^ | ) main.c:20:10: error: expected ')' before ';' token 20 | wh...
s007451896
p02256
C
#include <stdio.h> int main () { int x, y, z, a,b,c, swap; c = 0; scanf ("%d %d", &x, &y); if (x < y) { a = y; b = x }else{ a = x; b = y; } while(1) { c = a % b; if(c == 0){ printf("%d\n", b); break; } a = b; b = ...
main.c: In function 'main': main.c:12:12: error: expected ';' before '}' token 12 | b = x | ^ | ; 13 | }else{ | ~
s989367592
p02256
C
#include<stdio.h> int main (){ int x,y,d=0; scanf("%d %d ",&x,&y); if(x>y){ while(d>0;d++){ if(x/d==0&&x/y%d==0) break; } printf("%d",d); } else{ while(d>0;d++){ if(x/d==0&&x/y%d==0) break; } printf("%d",d); }
main.c: In function 'main': main.c:9:11: error: expected ')' before ';' token 9 | while(d>0;d++){ | ~ ^ | ) main.c:20:10: error: expected ')' before ';' token 20 | while(d>0;d++){ | ~ ^ | ) main.c:27:1: error: expected declaration or statement at end of ...
s952596312
p02256
C
#include <stdio.h> int main () { int x, y, swap; c = 0; scanf ("%d %d", &x, &y); if (x < y) { swap = x; x = y; y = swap; } while(1) { z = x % y; if(z == 0){ printf("%d\n", y); break; } x = y; y = z; } return 0; }
main.c: In function 'main': main.c:6:4: error: 'c' undeclared (first use in this function) 6 | c = 0; | ^ main.c:6:4: note: each undeclared identifier is reported only once for each function it appears in main.c:18:7: error: 'z' undeclared (first use in this function) 18 | z = x % y; | ...
s220473010
p02256
C
#include <stdio.h> int main () { int x, y, swap; z = 0; scanf ("%d %d", &x, &y); if (x < y) { swap = x; x = y; y = swap; } while(1) { z = x % y; if(z == 0){ printf("%d\n", y); break; } x = y; y = z; } return 0; }
main.c: In function 'main': main.c:6:4: error: 'z' undeclared (first use in this function) 6 | z = 0; | ^ main.c:6:4: note: each undeclared identifier is reported only once for each function it appears in
s933634159
p02256
C
#include<stdio.h> int main (){ int x,y,d=0; scanf("%d %d ",&x,&y); if(x>y){ while(d>0){ if(x/d==0&&x/y%d==0) break; d++; } printf("%d",d); } else{ while(d>0;d++){ if(x/d==0&&x/y%d==0) break; } printf("%d",d); }
main.c: In function 'main': main.c:22:10: error: expected ')' before ';' token 22 | while(d>0;d++){ | ~ ^ | ) main.c:29:1: error: expected declaration or statement at end of input 29 | } | ^
s340818105
p02256
C
#include<stdio.h> int main (){ int x,y,d=0; scanf("%d %d ",&x,&y); if(x>y){ while(d>0){ if(x/d==0&&x/y%d==0) break; d++; } printf("%d",d); } else{ while(d>0){ if(x/d==0&&x/y%d==0) break; d++; } printf("%d",d); }
main.c: In function 'main': main.c:30:1: error: expected declaration or statement at end of input 30 | } | ^
s770455836
p02256
C
#include <stdio.h> int gcd(int a,int b) { if (a < b){ swap(x, y) while (y > 0){ r = a % b; a = b; b = r; } return x; } } int main(void) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); return 0; }
main.c: In function 'gcd': main.c:6:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 6 | swap(x, y) | ^~~~ main.c:6:14: error: 'x' undeclared (first use in this function) 6 | swap(x, y) | ^ main.c:6:14: note: each undeclared ide...
s949887643
p02256
C
#include <stdio.h> int gcd(int a,int b) { if (a < b){ swap(a, b) while (y > 0){ r = a % b; a = b; b = r; } return x; } } int main(void) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); return 0; }
main.c: In function 'gcd': main.c:6:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 6 | swap(a, b) | ^~~~ main.c:6:19: error: expected ';' before 'while' 6 | swap(a, b) | ^ | ; 7 | while (y ...
s049720591
p02256
C
#include <stdio.h> int gcd(int a,int b) { if (a < b){ swap(a, b); while (y > 0){ r = a % b; a = b; b = r; } return x; } } int main(void) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); return 0; }
main.c: In function 'gcd': main.c:6:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 6 | swap(a, b); | ^~~~ main.c:7:12: error: 'y' undeclared (first use in this function) 7 | while (y > 0){ | ^ main.c:7:12: note: each undeclared iden...
s186305689
p02256
C
#include <stdio.h> int gcd(int a,int b) { if (a < b){ swap(a, b); while (b > 0){ r = a % b; a = b; b = r; } return x; } } int main(void) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); return 0; }
main.c: In function 'gcd': main.c:6:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration] 6 | swap(a, b); | ^~~~ main.c:8:9: error: 'r' undeclared (first use in this function) 8 | r = a % b; | ^ main.c:8:9: note: each undeclared identifie...