submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s448135822 | p02256 | C | #include<stdio.h>
int main()
{
int x,y,z;
scanf("%d %d",&x,&y);
while (x%y =0)
{
z = x % y;
x = y;
y = z;
}
printf("%d",y);
return 0;
} | main.c: In function 'main':
main.c:6:14: error: lvalue required as left operand of assignment
6 | while (x%y =0)
| ^
|
s479913251 | p02256 | C | #include <stdio.h>
int main()
{
int x, y, z;
scanf("%d%d", &a, &b);
if(x >= y)
{
x = x % y;
for(z = y; z > 0; z--)
{
if(x % z == 0 && y % z == 0) break;
}
}
else (y >= x)
{
y = y % x;
for(z = x; z > 0; z--)
{
if(x % z == 0 && y % z == 0) break;
}
}
prin... | main.c: In function 'main':
main.c:7:18: error: 'a' undeclared (first use in this function)
7 | scanf("%d%d", &a, &b);
| ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:22: error: 'b' undeclared (first use in this function)
... |
s443222073 | p02256 | C | #include <stdio.h>
int main()
{
int x, y, z;
scanf("%d%d", &x, &y);
if(x >= y)
{
x = x % y;
for(z = y; z > 0; z--)
{
if(x % z == 0 && y % z == 0) break;
}
}
else (y >= x)
{
y = y % x;
for(z = x; z > 0; z--)
{
if(x % z == 0 && y % z == 0) break;
}
}
prin... | main.c: In function 'main':
main.c:16:16: error: expected ';' before '{' token
16 | else (y >= x)
| ^
| ;
17 | {
| ~
|
s083060359 | p02256 | C | #include<stdio.h>
main() {
int n, m, j;
scanf("%d %d",&n &m);
while(m != 0) {
j = n % m;
n = m;
m = j;
}
printf("%d???n", n);
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main() {
| ^~~~
main.c: In function 'main':
main.c:6:18: error: invalid operands to binary & (have 'int *' and 'int')
6 | scanf("%d %d",&n &m);
| ~~ ^
| |
| int *
|
s407096050 | p02256 | C | #include<stdio.h>
main() {
int n, m, j;
scanf("%d %d",&n &m);
while(m != 0) {
j = n % m;
n = m;
m = j;
}
printf("%d???n", n);
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main() {
| ^~~~
main.c: In function 'main':
main.c:4:18: error: invalid operands to binary & (have 'int *' and 'int')
4 | scanf("%d %d",&n &m);
| ~~ ^
| |
| int *
|
s495026308 | p02256 | C | #include<stdio.h>
main() {
int n, m, j;
scanf("%d %d",&n &m);
while(m != 0) {
j = n % m;
n = m;
m = j;
}
printf("%d", n);
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main() {
| ^~~~
main.c: In function 'main':
main.c:4:18: error: invalid operands to binary & (have 'int *' and 'int')
4 | scanf("%d %d",&n &m);
| ~~ ^
| |
| int *
|
s346972141 | p02256 | C | #include<stdio.h>
main()
{
int x,y,d;
scanf("%d%d",&x,&y);
while((d = x%y) !=0)
{
x = y; // ????????§y???x?????£??\??????
y = d;
/* ?????????????????¨??§??????while?????????????°??????????????????¨?????§?????? */
printf("%d\n",y);
return 0;
} | main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
4 | main()
| ^~~~
main.c: In function 'main':
main.c:21:1: error: expected declaration or statement at end of input
21 | }
| ^
|
s796727440 | p02256 | C | #include<stdio.h>
main()
{
int x,y,d;
scanf("%d%d",&x,&y);
while((d = x%y) !=0)
{
x = y;
y = d;
printf("%d\n",y);
return 0;
} | main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
4 | main()
| ^~~~
main.c: In function 'main':
main.c:21:1: error: expected declaration or statement at end of input
21 | }
| ^
|
s292161804 | p02256 | C | #include<stdio.h>
main(){
int x,y,r;
scanf("%d%d",&x,&y);
/* if(x>=y){
gcd(x,y)
*/
gcd(x, y);
if (x < y){
swap(x, y);
}
while (y > 0){
r = x % y;
x = y;
y = r;
}
return x;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:12:3: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
12 | gcd(x, y);
| ^~~
main.c:14:5: error: implicit declaration of function 'swap' [-Wimplic... |
s178194310 | p02256 | C | #include <stdio.h>
#define LOOP_END 0
#define EXIT_SUCCESS 0
int main(void)
{
unsigned long long ullW_Dtc_x; /*???????????±??????X*/
unsigned long long ullW_Dtc_y; /*???????????±??????Y*/
unsigned long long ullW_Dcalc; /*????\???¨?????°*/
unsigned long long ullW_Dgcd; /*?????§??¬?´???°*/
scanf("%d ... | main.c: In function 'main':
main.c:20:30: error: 'ullW_Dx' undeclared (first use in this function); did you mean 'ullW_Dgcd'?
20 | ullW_Dcalc = ullW_Dx % ullW_Dy;
| ^~~~~~~
| ullW_Dgcd
main.c:20:30: note: each undeclared identifier... |
s384817568 | p02256 | C | #include <stdio.h>
#define LOOP_END 0
#define EXIT_SUCCESS 0
int main(void)
{
unsigned long long ullW_Dtc_x; /*???????????±??????X*/
unsigned long long ullW_Dtc_y; /*???????????±??????Y*/
unsigned long long ullW_Dcalc; /*????\???¨?????°*/
unsigned long long ullW_Dgcd; /*?????§??¬?´???°*/
scanf("%d ... | main.c: In function 'main':
main.c:22:30: error: 'ullW_Dtc_r' undeclared (first use in this function); did you mean 'ullW_Dtc_y'?
22 | ullW_Dtc_y = ullW_Dtc_r;
| ^~~~~~~~~~
| ullW_Dtc_y
main.c:22:30: note: each undeclared identifie... |
s972164666 | p02256 | C | #define INF_LOOP 1
int main(void)
{
unsigned long long ullW_Dtc_x; /*???????????±??????X*/
unsigned long long ullW_Dtc_y; /*???????????±??????Y*/
unsigned long long ullW_Dcalc; /*????\???¨?????°*/
unsigned long long ullW_Dgcd; /*?????§??¬?´???°*/
scanf("%d %d", &ullW_Dtc_x, &ullW_Dtc_y); /*?????????... | main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
10 | scanf("%d %d", &ullW_Dtc_x, &ullW_Dtc_y); /*???????????±????????\???*/
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+... |
s012472745 | p02256 | C | 2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
main(){
int a,b,tmp;
scanf("%d %d",&a,&b);
while(b > 0){
tmp = a % b;
a = b;
b = tmp;
}
printf("%d\n",a);
return 0;
}
| main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 2
| ^
In file included from /usr/include/stdio.h:47,
from main.c:21:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | ... |
s031145974 | p02256 | C | #include<stdio.h>gcd(int a,int b){
int r;
if(a<b){
int t = a;
a = b;
b = t;
}
for(;;){
r=a%b;
//printf("%d=%d??%d+%d\n",a,a/b,b,r);
a = b;
b = r;
if(r==0)break;
}
return a;
}
int main (void){
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",gcd(a,b));
return 0;
} | main.c:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>gcd(int a,int b){
| ^~~
main.c:4:9: error: expected identifier or '(' before 'if'
4 | if(a<b){
| ^~
main.c:10:9: error: expected identifier or '(' before 'for'
10 | for(;;... |
s079581343 | p02256 | C | #include<stdio.h>gcd(int a,int b){
int r;
if(a<b){
int t = a;
a = b;
b = t;
}
for(;;){
r=a%b;
//printf("%d=%d??%d+%d\n",a,a/b,b,r);
a = b;
b = r;
if(r==0)break;
}
return a;
}
int main (void){
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",gcd(a,b));
return 0;
}
/*??? ????... | main.c:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>gcd(int a,int b){
| ^~~
main.c:4:9: error: expected identifier or '(' before 'if'
4 | if(a<b){
| ^~
main.c:10:9: error: expected identifier or '(' before 'for'
10 | for(;;... |
s163017799 | p02256 | C | #include <stdio.h>
int main(int argc, char* argv[])
{
int x = 0, y = 0;
scanf("%d %d", &x, &y);
if (x > y) {
int tmp = x;
x = y;
y = tmp;
}
bool loop = true;
while (loop) {
int mod = x % y;
if (mod == 0) {
break;
} else {
x = y;
y = mod;
}
}
printf("%d\r\n", y);
return 0;
} | main.c: In function 'main':
main.c:14:9: error: unknown type name 'bool'
14 | bool loop = true;
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:1... |
s188949270 | p02256 | C | #include <stdio.h>
#include <math.h>
int gcd(int c, int d)
{
int i, gcd;
gcd = 0;
for (i = 0; i < sqrt(c); i++) {
if (v % i == 0) {
if (d % i == 0) {
gcd = i;
}
}
}
return gcd
}
int main(int argc, char** argv)
{
int a, b, result;
scanf("%d %d", &a, &b);
if (a >= b) {
result = gcd(a % b, b);
... | main.c: In function 'gcd':
main.c:9:21: error: 'v' undeclared (first use in this function)
9 | if (v % i == 0) {
| ^
main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:19: error: expected ';' before '}' token
15 ... |
s904025823 | p02256 | C | #include <stdio.h>
#include <math.h>
int gcd(int c, int d)
{
int i, gcd;
gcd = 0;
for (i = 0; i < sqrt(c); i++) {
if (c % i == 0) {
if (d % i == 0) {
gcd = i;
}
}
}
return gcd
}
int main(int argc, char** argv)
{
int a, b, result;
scanf("%d %d", &a, &b);
if (a >= b) {
result = gcd(a % b, b);
... | main.c: In function 'gcd':
main.c:15:19: error: expected ';' before '}' token
15 | return gcd
| ^
| ;
16 | }
| ~
|
s617110722 | p02256 | C | d",&x,&y);
if(x>y){
keep=x;
x=y;
y=keep;
}
for(i=1;i<=x;i++){
if(x%i==0&&y%i==0){
result=i;
}
}
printf("%d\n",result);
return 0;
} | main.c:1:2: warning: missing terminating " character
1 | d",&x,&y);
| ^
main.c:1:2: error: missing terminating " character
1 | d",&x,&y);
| ^~~~~~~~~
main.c:3:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
3 | if(x>y){
| ^~
main.c:9:3: error: expected identifi... |
s204448412 | p02256 | C | #include <stdio.h>
main()
{
int a, b, n;
scanf("%d%d",&a,&b);
if(a < b){
swap(a,b);
}
while((n = a % b)!= 0) {
a = b;
b = n;
}
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:9:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
9 | swap(a,b);
| ^~~~
|
s136957796 | p02256 | C | #include <stdio.h>
#include <stdlib.h>
main()
{
int a, b, n;
scanf("%d%d",&a,&b);
if(a < b){
swap(a,b);
}
while((n = a % b)!= 0) {
a = b;
b = n;
}
printf( "%d\n",b);
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main()
| ^~~~
main.c: In function 'main':
main.c:10:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(a,b);
| ^~~~
|
s460340783 | p02256 | C | #include <stdio.h>
#include <string.h>
main()
{
int a, b, n;
scanf("%d%d",&a,&b);
if(a < b){
swap(a,b);
}
while((n = a % b)!= 0) {
a = b;
b = n;
}
printf( "%d\n",b);
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main()
| ^~~~
main.c: In function 'main':
main.c:10:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(a,b);
| ^~~~
|
s614750091 | p02256 | C | #include <stdio.h>
int main(){
int a, b, tmp;
scanfb;
b = tmp;
}
while(b != 0){
tmp = b;
b = a % b;
a = tmp;
}
printf("%d", a);
return 0;
}("%d%d", &a, &b);
if(a < b){
tmp = a;
a = | main.c: In function 'main':
main.c:5:3: error: 'scanfb' undeclared (first use in this function); did you mean 'scanf'?
5 | scanfb;
| ^~~~~~
| scanf
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:9:3: error: expected i... |
s239727388 | p02256 | C | #include <stdio.h>
int main() {
int i, x, y;
scanf("%d%d",&x,&y);
// x changed greater number
if(y > x) {
i = x;
x = y;
y = i;
}
for(i = y;i > 0;i--)
if(x % i ==0 && y % i == 0) break;
printf("%d\n",i);
return 0;
} | main.c: In function 'main':
main.c:7:1: error: stray '\343' in program
7 | <U+3000>// x changed greater number
| ^~~~~~~~
|
s419722062 | p02256 | C | #include <stdio.h>
int main() {
int i, x, y;
scanf("%d%d",&x,&y);
// x changed greater number
if(y > x) {
i = x;
x = y;
y = i;
}
for(i = y;i > 0;i--)
if(x % i ==0 && y % i == 0) break;
printf("%d\n",i);
return 0;
} | main.c: In function 'main':
main.c:7:1: error: stray '\343' in program
7 | <U+3000>// x changed greater number
| ^~~~~~~~
|
s364851512 | p02256 | C | #include <stdio.h>
int main(){
int x,y,i,d;
/* Using loop to check input numbers are in constrants or not */
while(1){
scanf("%d %d", &x,&y);
if(x>=1 && y<=1000000000)break;
else printf("error!"\n);
}
/* make three situations x>y, x<y and x=y */
if(x>y){
d=x%y;
for(i=d ; i>0 ; i--){
... | main.c: In function 'main':
main.c:11:25: error: stray '\' in program
11 | else printf("error!"\n);
| ^
main.c:11:25: error: expected ')' before 'n'
11 | else printf("error!"\n);
| ~ ^~
| )
|
s977731494 | p02256 | C | #Include<stdio.h>
int main(){
int a, b, temp;
scanf("%d%d",&a,&b);
if(a < b){
temp = a;
a = b;
b = temp;
}
while(b > 0){
temp = a % b;
a = b;
b = temp;
}
printf("%d\n", a);
return 0;
} | main.c:1:2: error: invalid preprocessing directive #Include; did you mean #include?
1 | #Include<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | scanf("%d%d",&a,&b);
| ^~~~~
main.c:... |
s315074253 | p02256 | C | #include <stdio.h>
int main()
{
int x,y,r;
scanf("%d%d",x,y);
if(x<y)
{
r=x;
x=y;
y=r;
}
while(1)
{
r=x%y;
x=y;
y=r;
if(y=0) break;
}
}
return 0 | main.c:20:1: error: expected identifier or '(' before 'return'
20 | return 0
| ^~~~~~
|
s097169231 | p02256 | C | #include<stdio.h>
int main(){
int x,y,tmp,r;
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;
}#include<stdio.h>
int main(){
int x,y,tmp,r;
scanf("%d%d",&x,&y);
... | main.c:28:2: error: stray '#' in program
28 | }#include<stdio.h>
| ^
main.c:28:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
28 | }#include<stdio.h>
| ^
|
s771469112 | p02256 | C | #include <stdio.h>
int main(){
int x,y,smo,big,arr;
scanf("%d,%d",&x,&y);
if(x=>y){
smo=y;
big=x;
{
else{
smo=x;
big=y;
}
while(1){
arr=big%smo;
if(arr=0)break;
smo=big;
arr=smo;
}
printf("%d\n",smo);
return 0; | main.c: In function 'main':
main.c:5:8: error: expected expression before '>' token
5 | if(x=>y){
| ^
main.c:9:5: error: 'else' without a previous 'if'
9 | else{
| ^~~~
main.c:20:5: error: expected declaration or statement at end of input
20 | return 0;
| ^~~~~~
mai... |
s337028300 | p02256 | C | #include <stdio.h>
int main(){
int x,y,smo,big,arr=1,ans;
scanf("%d%d",&x&y);
if(x>=y){
smo=y;
big=x;
}
else{
smo=x;
big=y;
}
while(1){
arr=big%smo;
if(arr==0){
ans=smo;
break;
}
smo=big;
arr=smo;
}
printf("%d\n",ans);
return 0;
} | main.c: In function 'main':
main.c:4:18: error: invalid operands to binary & (have 'int *' and 'int')
4 | scanf("%d%d",&x&y);
| ~~^
| |
| int *
|
s695375359 | p02256 | C | //?????§??¬?´???°
#include<stdio.h>
#define swap(type, x, y) do{type t = x; x = y; y = t;} while(0)
long gcd(long x, long y){
if(x % y == 0) return y;
else {
return gcd(y, x % y);
}
}
int main(void){
long x;
long y;
long ans;
scanf("%ld", &x);
scanf("%ld", &y);
... | main.c: In function 'main':
main.c:27:5: error: expected declaration or statement at end of input
27 | printf("%ld\n", ans);
| ^~~~~~
|
s817405754 | p02256 | C | #include "stdafx.h"
#include <stdio.h>
#include <math.h>
int N;
int A[1000];
int insertion(int a, int b);
int print(int d[], int c);
int main(){
int i = 0;
int ab, cd;
scanf("%d %d", &ab, &cd);
//printf("%d %d", ab,cd);
printf("%d", insertion(ab, cd));
return 0;
}
int insertion(int a, int b){
int v;... | main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s164309805 | p02256 | C | #include <stdio.h>
int N;
int A[1000];
int insertion(int a, int b);
int print(int d[], int c);
int main(){
int i = 0;
int ab, cd;
scanf("%d %d", &ab, &cd);
printf("%d", insertion(ab, cd));
return 0;
}
int insertion(int a, int b){
int v;
int i;
int j;
int y;
if (a <= b){
v = a;
a = b;
b =... | main.c: In function 'insertion':
main.c:54:1: error: expected expression before '?' token
54 | ???return y;
| ^
|
s755862167 | p02256 | C | #include <stdio.h>
int N;
int A[1000];
int insertion(int a, int b);
int main(){
int i = 0;
int ab, cd;
scanf("%d %d", &ab, &cd);
printf("%d", insertion(ab, cd));
return 0;
}
int insertion(int a, int b){
int v;
int i;
int j;
int y;
if (a <= b){
v = a;
a = b;
b = a;
}
while (b > 0){
j ... | main.c: In function 'insertion':
main.c:52:1: error: expected expression before '?' token
52 | ???return y;
| ^
|
s484649171 | p02256 | C | #include<stdio.h>
int main()
{
int a,b,r,temp;
scanf("%d%d",&a,&b);
if(a<b){
tmp=a;
a=b;
b=temp;
}
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:8:17: error: 'tmp' undeclared (first use in this function); did you mean 'temp'?
8 | tmp=a;
| ^~~
| temp
main.c:8:17: note: each undeclared identifier is reported only once for each function it appears in
|
s561668728 | p02256 | C | include <stdio.h>
int main(void) {
int a, b, i, c, d, e, f;
e = 0;
if(a > b) {
f = a;
a = b;
b = f;
}
scanf("%d %d", a, b);
for(i = 1; i < a; i++) {
if(a % i == 0) {
c = i;
}
if(b % i == 0) {
d = i;
}
... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s823463834 | p02256 | C | #include <stdio.h>
int main(){
int a, b, d, n;
scanf("%d %d", &a, &b);
for(n=1;n<a;n++){
if((a%n==0)&&(b%n==0){
d=n;
}
}
printf("%d\n", d);
return 0;
}
| main.c: In function 'main':
main.c:7:32: error: expected ')' before '{' token
7 | if((a%n==0)&&(b%n==0){
| ~ ^
| )
main.c:10:6: error: expected expression before '}' token
10 | }
| ^
|
s351436257 | p02256 | C | include <stdio.h>
int main(void) {
int a, b, i, c, d, e, f;
e = 0;
if(a > b) {
f = a;
a = b;
b = f;
}
scanf("%d %d", a, b);
for(i = 1; i < a; i++) {
if(a % i == 0) {
c = i;
}
if(b % i == 0) {
d = i;
}
... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s620182748 | p02256 | C | include <stdio.h>
int main(void) {
int a, b, i, c, d, e, f;
e = 0;
if(a > b) {
f = a;
a = b;
b = f;
}
scanf("%d %d", a, b);
for(i = 1; i < a; i++) {
if(a % i == 0) {
c = i;
}
if(b % i == 0) {
d = i;
}
... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s007036864 | p02256 | C | include <stdio.h>
int main(void) {
int a, b, i, c, d, e, f;
e = 0;
scanf("%d %d", a, b);
if(a > b) {
f = a;
a = b;
b = f;
}
for(i = 1; i < a; i++) {
if(a % i == 0) {
c = i;
}
if(b % i == 0) {
d = i;
}
... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s773249273 | p02256 | C | #include <stdio.h>
int main()
{
int a, b, x, y;
scanf("%d %d ", &a, &b);
for( int i = a; i > 0; i--) {
x = a % i;
y = b % i;
if (x == 0 && y == 0) {
break;
}
}
printf ("%d \n", i);
return 0;
} | main.c: In function 'main':
main.c:17:20: error: 'i' undeclared (first use in this function)
17 | printf ("%d \n", i);
| ^
main.c:17:20: note: each undeclared identifier is reported only once for each function it appears in
|
s258920115 | p02256 | C | #include <stdio.h>
int main()
{
int a, b, x, y;
scanf("%d %d", &a, &b);
for( int i = a; i > 0; i--) {
x = a % i;
y = b % i;
if (x == 0 && y == 0) {
break;
}
}
printf ("%d\n", i);
return 0;
} | main.c: In function 'main':
main.c:17:19: error: 'i' undeclared (first use in this function)
17 | printf ("%d\n", i);
| ^
main.c:17:19: note: each undeclared identifier is reported only once for each function it appears in
|
s497868958 | p02256 | C | #include <stdio.h>
int main() {
int a, b;
scanf ("%d %d", &a, &b);
if (a = b) {
printf ("%d", a);
} else if (a > b) {
while (b > 0) {
c = a % b;
a = b;
b = c;
}
printf ("%d", a);
} else if (a < b) {
while (a > 0) {
c = b % a;
b =... | main.c: In function 'main':
main.c:10:10: error: 'c' undeclared (first use in this function)
10 | c = a % b;
| ^
main.c:10:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:15: warning: missing terminating " character
21 | printf ("%... |
s988118054 | p02256 | C | #include <stdio.h>
int main() {
int a, b, c;
c = 0;
scanf ("%d %d", &a, &b);
if (a = b) {
printf ("%d", a);
} else if (a > b) {
while (b > 0) {
c = a % b;
a = b;
b = c;
}
printf ("%d", a);
} else if (a < b) {
while (a > 0) {
c = b % a;... | main.c: In function 'main':
main.c:22:15: warning: missing terminating " character
22 | printf ("%d, b);
| ^
main.c:22:15: error: missing terminating " character
22 | printf ("%d, b);
| ^~~~~~~~
main.c:23:4: error: expected expression before '}' token
23 | ... |
s744162063 | p02256 | C | #include<stdio.h>
int main()
int x, y, z;
do {
if (x < y) y = y % x ;
if (x >= y) x = x % y ;
} while ( x % y == 0 || y % x = 00);
if (x <= y) printf ("%d\n", x);
if (y < x) printf ("%d\n", y);
return 0;
} | main.c: In function 'main':
main.c:6:5: error: expected declaration specifiers before 'do'
6 | do {
| ^~
main.c:9:7: error: expected declaration specifiers before 'while'
9 | } while ( x % y == 0 || y % x = 00);
| ^~~~~
main.c:11:5: error: expected declaration specifiers before 'if... |
s130630565 | p02256 | C | #include<stdio.h>
int main() {
int x, y, z;
do {
if (x < y) y = y % x ;
if (x >= y) x = x % y ;
} while ( x % y == 0 || y % x = 00);
if (x <= y) printf ("%d\n", x);
if (y < x) printf ("%d\n", y);
return 0;
} | main.c: In function 'main':
main.c:9:35: error: lvalue required as left operand of assignment
9 | } while ( x % y == 0 || y % x = 00);
| ^
|
s406945510 | p02256 | C | #include<stdio.h>
int main(void) {
int a,b,c,i;
scanf("%d %d",&a,&b);
if (a=<b) {
for (i = 1;i <= a;i++) {
if (a%i == 0 && b%i == 0)
c = i;
}
}
else {
for (i = 1;i <= b;i++) {
if (a%i == 0 && b%i == 0)
c = i;
}
}
printf("%d\n"... | main.c: In function 'main':
main.c:6:11: error: expected expression before '<' token
6 | if (a=<b) {
| ^
|
s392024271 | p02256 | C | #include<stdio.h>
int main(){
int x ,y ,max ,min ,newmax ,ans;
if(x>y){
max=x;
min=y;
}
else{
max=y;
min=x;
}
while(max!=min){
newmax=min;
min=max%min;
max=newmax;
}
printf("%d\n" ,max); | main.c: In function 'main':
main.c:18:9: error: expected declaration or statement at end of input
18 | printf("%d\n" ,max);
| ^~~~~~
|
s796433908 | p02256 | C | #include<stdio.h>
int main(void)
{
int x, y,z;
scanf ("%d %d" ,&x ,&y);
gcd (x,y) = z;
printf ("%d\n" ,z);
return 0;
}
| main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
10 | gcd (x,y) = z;
| ^~~
main.c:10:19: error: lvalue required as left operand of assignment
10 | gcd (x,y) = z;
| ^
|
s597742836 | p02256 | C | #include<stdio.h>
int main(void) {
int a,b,c,i;
scanf("%d %d",&a,&b);
if (a =< b) {
for (i = 1; i <= a; i++) {
if (a % i == 0 && b % i == 0)
c = i;
}
}
else {
for (i = 1; i <= b; i++) {
if (a % i == 0 && b % i == 0)
c = i;
}
}
... | main.c: In function 'main':
main.c:6:12: error: expected expression before '<' token
6 | if (a =< b) {
| ^
|
s242888082 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a &b);
if (a >= b) {
for (i = 1; i <= a; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
}
}
else (b > a) {
for (i = 1; i <= b; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
... | main.c: In function 'main':
main.c:5:22: error: invalid operands to binary & (have 'int *' and 'int')
5 | scanf("%d %d", &a &b);
| ~~ ^
| |
| int *
main.c:8:11: error: 'i' undeclared (first use in this function)
8 | for (i = 1; i <=... |
s749200652 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a, &b);
if (a >= b) {
for (i = 1; i <= a; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
}
}
else (b > a) {
for (i = 1; i <= b; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
... | main.c: In function 'main':
main.c:8:11: error: 'i' undeclared (first use in this function)
8 | for (i = 1; i <= a; i++) {
| ^
main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:16: error: expected ';' before '{' token
15 | else (... |
s966493298 | 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;
printf("%d",x);
return 0;
} | main.c: In function 'main':
main.c:6:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
6 | swap(x,y);
| ^~~~
|
s991239503 | p02256 | C | #include <stdio.h>
int main() {
int a, b, c;
scanf ("%d %d", &a, &b);
do {
c = b
b = a%c;
a = c;
} while (b == 0)
printf ("%d\n", c);
return 0;
}
| main.c: In function 'main':
main.c:7:11: error: expected ';' before 'b'
7 | c = b
| ^
| ;
8 | b = a%c;
| ~
main.c:10:22: error: expected ';' before 'printf'
10 | } while (b == 0)
| ^
| ;
11... |
s049854860 | 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;
printf("%d",x);
return 0;
} | main.c: In function 'main':
main.c:6:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
6 | swap(x,y)
| ^~~~
main.c:6:16: error: expected ';' before 'while'
6 | swap(x,y)
| ^
| ;
7 | while(y>0)
| ~... |
s908443009 | p02256 | C | #include<stdio.h>
int main(void){
int a,bx,y,r;
scanf("%d %d",&a,&b);
if(a<b)
x=b;y=a;
else if(a>b)
x=a;y=b;
while(y>0)
r=x%y;
x=y;
y=r;
printf("%d",x);
return 0;
} | main.c: In function 'main':
main.c:4:22: error: 'b' undeclared (first use in this function)
4 | scanf("%d %d",&a,&b);
| ^
main.c:4:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:7: error: 'x' undeclared (first use in this function)
... |
s641684922 | p02256 | C | #include<stdio.h>
int main(void){
int a,b,x,y,r;
scanf("%d %d",&a,&b);
if(a<b)
x=b;y=a;
else if(a>b)
x=a;y=b;
while(y>0)
r=x%y;
x=y;
y=r;
printf("%d",x);
return 0;
} | main.c: In function 'main':
main.c:7:4: error: 'else' without a previous 'if'
7 | else if(a>b)
| ^~~~
|
s622347938 | p02256 | C | #include <stdio.h>
int main() {
int a, b, c;
scanf ("%d %d", &a, &b);
do {
c = b
b = a%c;
a = c;
} while (b == 0);
printf ("%d\n", c);
return 0;
}
| main.c: In function 'main':
main.c:7:11: error: expected ';' before 'b'
7 | c = b
| ^
| ;
8 | b = a%c;
| ~
|
s879118475 | p02256 | C | #include <stdio.h>
int main(){
int x, y, m, n, d;
scanf("%d %d", &x, &y);
if (x>y) {m=x; n=y;}
else if(x<y) {m=y; n=x;}
else d=x;
do{
d = m % n;
m=n; n=d;
}while(d!=0)
printf("%d\n", d);
} | main.c: In function 'main':
main.c:13:15: error: expected ';' before 'printf'
13 | }while(d!=0)
| ^
| ;
14 |
15 | printf("%d\n", d);
| ~~~~~~
|
s312587849 | p02256 | C | #include<stdio.h>
int main(void){
int a,b,x,y,r;
scanf("%d %d",&a,&b);
if(a<b)
x=b;y=a;
else
x=a;y=b;
while(y>0)
r=x%y;
x=y;
y=r;
printf("%d",x);
return 0;
} | main.c: In function 'main':
main.c:7:4: error: 'else' without a previous 'if'
7 | else
| ^~~~
|
s550608527 | p02256 | C | #include <stdio.h>
int main() {
int a, b, c;
scanf ("%d %d", &a, &b);
do {
c = b
b = a%c;
a = c;
} while (b == 0);
printf ("%d\n", c);
return 0;
}
| main.c: In function 'main':
main.c:7:11: error: expected ';' before 'b'
7 | c = b
| ^
| ;
8 | b = a%c;
| ~
|
s365320167 | p02256 | C | #include<stdio.h>
int main(void)
{
int x, y, a, b, c, d;
scanf ("%d %d" ,&x ,&y);
if (x > y){
x = a;
y = b;
} else {
x = b;
y = a;
}
while {
d=1;
if (a % d == 0 && b % d == 0)
d = c;
} (d == a)
printf("%d \n" ,c);
return 0;
}
| main.c: In function 'main':
main.c:16:15: error: expected '(' before '{' token
16 | while {
| ^
| (
main.c:20:19: error: expected ';' before 'printf'
20 | } (d == a)
| ^
| ;
21 |
22 | printf("%d ... |
s726054780 | p02256 | C | #include<stdio.h>
int main(void){
int a,b,x,y,r;
scanf("%d %d",&a,&b);
if(a<b)
x=b;y=a;
else
x=a;y=b;
while(y>0)
r=x%y;
x=y;
y=r;
printf("%d",y);
return 0;
} | main.c: In function 'main':
main.c:7:4: error: 'else' without a previous 'if'
7 | else
| ^~~~
|
s667132817 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a, &b);
if (a >= b) {
for (i = 1; i <= b; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
}
}
else (b > a) {
for (i = 1; i <= a; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
... | main.c: In function 'main':
main.c:8:11: error: 'i' undeclared (first use in this function)
8 | for (i = 1; i <= b; i++) {
| ^
main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:16: error: expected ';' before '{' token
15 | else (... |
s737821712 | p02256 | C | #include<stdio.h>
int main(){
int x,y,temp,gcd;
scanf("%d %d",&x,&y);
if(x>=y){
while(x==y){
x=x%y;
temp=x;
x=y;
y=temp;
}
}else if(y>=x){
while(x==y){
y=y%x;
temp=x;
x=y;
y=temp;
}
printf("%d\n"x);
return 0;
} | main.c: In function 'main':
main.c:24:22: error: expected ')' before 'x'
24 | printf("%d\n"x);
| ~ ^
| )
main.c:27:1: error: expected declaration or statement at end of input
27 | }
| ^
|
s612875293 | p02256 | C | #include<stdio.h>
int main(void){
int a,b,x,y,r;
scanf("%d %d",&a,&b);
if(a<b)
x=b;y=a;
else if(a>b)
x=a;y=b;
while(y>0){
r=x%y;
x=y;
y=r;}
printf("%d",y);
return 0;
} | main.c: In function 'main':
main.c:7:4: error: 'else' without a previous 'if'
7 | else if(a>b)
| ^~~~
|
s814315360 | p02256 | C | #include <stdio.h>
int main() {
int a, b, c;
scanf ("%d %d", &a, &b);
if (a > b) {
do {
c = b;
b = a%c;
a = c;
} while (b == 0);
if (b > a) {
do {
c = a;
a = b%c;
b = c;
} while (a == 0);
prin... | main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
22 | }
| ^
main.c:22:1: error: expected declaration or statement at end of input
|
s183755348 | p02256 | C | #include<stdio.h>
int main(){
int x,y,temp,gcd;
scanf("%d %d",&x,&y);
if(x>=y){
while(x==y){
x=x%y;
temp=x;
x=y;
y=temp;
}
}else if(y>x){
while(x==y){
y=y%x;
temp=x;
x=y;
y=temp;
}
printf("%d\n",x);
return 0;
} | main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
27 | }
| ^
|
s471023903 | p02256 | C | #include <stdio.h>
int main(void) {
int a, b, i, c, d, e, f, g;
e = 1;
scanf("%d %d", &a, &b);
if(a > b) {
f = a;
a = b;
b = f;
}
if(b % a == 0) {
e = a
}
else if{
g = b % a;
for(i = 1; i <= g; i++) {
if(g % i == 0) {
... | main.c: In function 'main':
main.c:15:13: error: expected ';' before '}' token
15 | e = a
| ^
| ;
16 | }
| ~
main.c:17:12: error: expected '(' before '{' token
17 | else if{
| ^
| (
|
s150665819 | p02256 | C | #include <stdio.h>
int main(void) {
int a, b, i, c, d, e, f, g;
e = 1;
scanf("%d %d", &a, &b);
if(a > b) {
f = a;
a = b;
b = f;
}
if(b % a == 0) {
e = a
}
else {
g = b % a;
for(i = 1; i <= g; i++) {
if(g % i == 0) {
... | main.c: In function 'main':
main.c:15:13: error: expected ';' before '}' token
15 | e = a
| ^
| ;
16 | }
| ~
|
s370814614 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a, &b);
if (a > b) {
for (i = 1; i <= b; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
}
}
else (b > a) {
for (i = 1; i <= a; i++) {
if (a % i == 0 && b % i ==0) {
x = i;
}
... | main.c: In function 'main':
main.c:8:11: error: 'i' undeclared (first use in this function)
8 | for (i = 1; i <= b; i++) {
| ^
main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:16: error: expected ';' before '{' token
15 | else (... |
s670683160 | p02256 | C | #include<stdio.h>
int main(){
int x,y,temp,gcd;
scanf("%d %d",&x,&y);
if(x>=y){
while(x%y){
x=x%y;
temp=x;
x=y;
y=temp;
}
gcd=y;
}else if(y>x){
while(x%y){
y=y%x;
temp=x;
x=y;
y=temp;
}
gcd=x
}
printf("%d\n",gcd);
return 0;
} | main.c: In function 'main':
main.c:24:22: error: expected ';' before '}' token
24 | gcd=x
| ^
| ;
25 | }
| ~
|
s918823743 | p02256 | C | #include<stdio.h>
int main(){
int x,y,temp,gcd;
scanf("%d %d",&x,&y);
if(x>=y){
while(x%y){
x=x%y;
temp=x;
x=y;
y=temp;
}
gcd=y;
}else if(y>x){
while(x%y){
y=y%x;
temp=x;
x=y;
y=temp;
}
gcd=x
}
printf("%d\n",gcd);
return 0;
} | main.c: In function 'main':
main.c:24:22: error: expected ';' before '}' token
24 | gcd=x
| ^
| ;
25 | }
| ~
|
s782520293 | p02256 | C | #include<stdio.h>
int main(void) {
int a,b,x;
scanf("%d %d",&a,&b);
if (a < b) {
while (a!=0) {
x = a % b;
a = b;
b = x;
}
}
else {
while (b!=0){
x = b % a;
b = a;
a = x;
}
printf("%d\n",b);
return 0;
} | main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
23 | }
| ^
|
s147111799 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a, &b);
if (a >= b) {
while (b != 0) {
x = a % b;
a = b;
b = x;
}
printf ("%d\n", a)
}
else (b > a) {
while (a != 0) {
x = b % a;
b = a;
a = x;
}
printf ("%d\n", b)
... | main.c: In function 'main':
main.c:13:23: error: expected ';' before '}' token
13 | printf ("%d\n", a)
| ^
| ;
14 | }
| ~
main.c:16:16: error: expected ';' before '{' token
16 | else (b > a) {
| ^... |
s869753744 | p02256 | C | #include <stdiop.h>
int mian(){
int x, y, z, m, n, d;
scanf("%d %d", &x, &y);
if(x>y) {m=x; n=y;}
else if(x<y) {m=y; n=x;}
else d=x;
do{
d=m%n;
m=n; n=d;
}while (d != 0);
printf("%d",m;
return 0;
} | main.c:1:10: fatal error: stdiop.h: No such file or directory
1 | #include <stdiop.h>
| ^~~~~~~~~~
compilation terminated.
|
s170503254 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a, &b);
if (a >= b) {
while (b != 0) {
x = a % b;
a = b;
b = x;
}
printf ("%d\n", a)
}
if (b > a) {
while (a != 0) {
x = b % a;
b = a;
a = x;
}
printf ("%d\n", b)
}
... | main.c: In function 'main':
main.c:13:23: error: expected ';' before '}' token
13 | printf ("%d\n", a)
| ^
| ;
14 | }
| ~
main.c:22:23: error: expected ';' before '}' token
22 | printf ("%d\n", b)
| ... |
s163199551 | p02256 | C | #include <stdiop.h>
int mian(){
int x, y, m, n, d;
scanf("%d %d", &x, &y);
if(x>y) {m=x; n=y;}
else if(x<y) {m=y; n=x;}
else d=x;
do{
d=m%n;
m=n; n=d;
}while (d != 0);
printf("%d",m;
return 0;
} | main.c:1:10: fatal error: stdiop.h: No such file or directory
1 | #include <stdiop.h>
| ^~~~~~~~~~
compilation terminated.
|
s397946920 | p02256 | C | #include <stdiop.h>
int main(){
int x, y, m, n, d;
scanf("%d %d", &x, &y);
if(x>y) {m=x; n=y;}
else if(x<y) {m=y; n=x;}
else d=x;
do{
d=m%n;
m=n; n=d;
}while (d != 0);
printf("%d",m;
return 0;
} | main.c:1:10: fatal error: stdiop.h: No such file or directory
1 | #include <stdiop.h>
| ^~~~~~~~~~
compilation terminated.
|
s293938560 | p02256 | C | #include <stdio.h>
int main () {
int a, b, x;
scanf("%d %d", &a, &b);
if (a >= b) {
while (b != 0) {
x = a % b;
a = b;
b = x;
}
printf ("%d\n", a);
}
else (b > a) {
while (a != 0) {
x = b % a;
b = a;
a = x;
}
printf ("%d\n", b);
... | main.c: In function 'main':
main.c:16:16: error: expected ';' before '{' token
16 | else (b > a) {
| ^~
| ;
|
s998137313 | p02256 | C | #include <stdiop.h>
int main(){
int x, y, m, n, d;
scanf("%d %d", &x, &y);
if(x>y) {m=x; n=y;}
else if(x<y) {m=y; n=x;}
else d=x;
do{
d=m%n;
m=n; n=d;
}while (d != 0);
printf("%d\n",m);
return 0;
} | main.c:1:10: fatal error: stdiop.h: No such file or directory
1 | #include <stdiop.h>
| ^~~~~~~~~~
compilation terminated.
|
s302480065 | p02256 | C | #include <stdiop.h>
int main(){
int x, y, m, n, d;
scanf("%d %d", &x, &y);
if(x>y) {m=x; n=y;}
else if(x<y) {m=y; n=x;}
else d=x;
do {
d=m%n;
m=n; n=d;
}while (d != 0);
printf("%d\n",m);
return 0;
} | main.c:1:10: fatal error: stdiop.h: No such file or directory
1 | #include <stdiop.h>
| ^~~~~~~~~~
compilation terminated.
|
s777960559 | p02256 | C | #include <stdio.h>
int main() {
int x, y, r;
scanf("%d %d", &x, &y);
if(x >= 1 && y >= 1 && y <= 1000000000){
if(x > y){
max = x;
min = y;
}else{
max = y;
min = x;
}
if(max > min){
while(r > 0){
r = max % min... | main.c: In function 'main':
main.c:8:12: error: 'max' undeclared (first use in this function)
8 | max = x;
| ^~~
main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: 'min' undeclared (first use in this function); did you ... |
s738891250 | p02256 | C | #include <stdio.h>
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\n", r);
return x;
} | main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(x, y)
| ^~~~
main.c:10:16: error: expected ';' before 'while'
10 | swap(x, y)
| ^
| ;
11 | while (y > 0)
| ... |
s478435568 | p02256 | C | #include <stdio.h>
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\n", r);
return 0;
} | main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(x, y)
| ^~~~
main.c:10:16: error: expected ';' before 'while'
10 | swap(x, y)
| ^
| ;
11 | while (y > 0)
| ... |
s578818871 | p02256 | C | #include <stdio.h>
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\n", r);
return 0;
} | main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(x, y);
| ^~~~
|
s573158276 | p02256 | C | #include <stdio.h>
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;
return x;
printf ("%d\n", r);
return 0;
} | main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(x, y);
| ^~~~
|
s252958347 | p02256 | C | #include <stdio.h>
int main(){
int a, b, d, e, i, k, aa, bb;
scanf("%d %d", &a, &b);
if(a > b){
c = a % b;
d = a;
} else {
c = b % a;
d = b;
}
e = 1;
for(i=1; i <= d; i++){
aa = c%i;
bb = d%i;
if( aa == 0){
if( bb == 0){
e = i;
}
}
}
printf("%d\n"... | main.c: In function 'main':
main.c:9:5: error: 'c' undeclared (first use in this function)
9 | c = a % b;
| ^
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
|
s290613353 | p02256 | C | #include <stdio.h>
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;
return x;
printf ("%d\n", r);
return 0;
} | main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
10 | swap(x, y);
| ^~~~
|
s574048682 | p02256 | C | #include <stdio.h>
int main(){
int a,b,c=1,x,y;
if(x>y)
a=x,b=y;
else
a=y,b=x;
while(c!=0){
c=a%b;
a=b;
b=c
}
printf("%d",b);
return 0;
} | main.c: In function 'main':
main.c:15:20: error: expected ';' before '}' token
15 | b=c
| ^
| ;
16 | }
| ~
|
s208677043 | p02256 | C | #include<stdio.h>
int main() {
int a, b ;
scanf ("%d %d", &a, &b) ;
do {
if (a < b) b = b % a ;
else (a >= b) a = a % b ;
} while ( a % b != 0 && b % a != 0) ;
if (a <= b) printf ("%d\n", a) ;
if (b < a) printf ("%d\n", b) ;
... | main.c: In function 'main':
main.c:10:22: error: expected ';' before 'a'
10 | else (a >= b) a = a % b ;
| ^~
| ;
|
s914911934 | p02256 | C | #include<stdio.h>
int main(){
int x[2];
int x, y, temp;
scanf("%d %d\n", &x, &y);
if(x>=y){
x[0]=x;
x[1]=y;
}
else{
x[0]=y;
x[1]=x;
}
while(x[1]!=0){
temp = x[0];
x[0] = x[1];
x[1] = x[0]%temp;
}
printf("%d\n", x[0]);
return 0;
}
| main.c: In function 'main':
main.c:5:7: error: conflicting types for 'x'; have 'int'
5 | int x, y, temp;
| ^
main.c:4:7: note: previous declaration of 'x' with type 'int[2]'
4 | int x[2];
| ^
|
s671984163 | p02256 | C | #include<stdio.h>
int main(){
int x[2];
int x, y, temp;
scanf("%d %d\n", &x, &y);
if(x>=y){
x[0]=x;
x[1]=y;
}
else{
x[0]=y;
x[1]=x;
}
while(x[1]!=0){
temp = x[0];
x[0] = x[1];
x[1] = temp%x[0];
}
printf("%d\n", x[0]);
return 0;
} | main.c: In function 'main':
main.c:5:7: error: conflicting types for 'x'; have 'int'
5 | int x, y, temp;
| ^
main.c:4:7: note: previous declaration of 'x' with type 'int[2]'
4 | int x[2];
| ^
|
s169698177 | 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 *
|
s664468689 | 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 *
|
s160929995 | 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(void)
{
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 *
|
s352982719 | 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 *
|
s515117025 | p02256 | C | #include <stdio.h>
int main() {
int i;
int x, y;
int d, gcd = 1;
scanf ("%d %d\n", &x, &y);
if (x >= y) {
for (i = 1 ; i <= x%y ; i++) {
d = i;
if (x%d == 0 && (x%y)%d == 0 && d > gcd)
gcd = d;
}
}
else {
for (i = 1 ; i <= y%x ; i++) {
d = i;
if (y%d == 0 &&... | main.c: In function 'main':
main.c:28:3: error: 'report' undeclared (first use in this function)
28 | report 0;
| ^~~~~~
main.c:28:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:9: error: expected ';' before numeric constant
28 | report 0;
| ... |
s635067903 | 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 *
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.