submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s860658120
|
p00005
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int gcd(int a, b) {
if(a == 0 || b == 0) return 0;
while(a != b) {
if(a > b) a -= b;
else b -= a;
}
return a;
}
int lcm(int a, int b) {
if(a == 0 || b == 0) return 0;
return (a / gcd(a, b)) * b;
}
int main() {
int a, b;
while(scanf("%d %d", &a, &b) != EOF) {
printf("%d %d\n", gcd(a, b), lcm(a, b));
}
}
|
main.c:5:16: error: unknown type name 'b'
5 | int gcd(int a, b) {
| ^
main.c: In function 'lcm':
main.c:16:21: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
16 | return (a / gcd(a, b)) * b;
| ^~~
|
s929695899
|
p00005
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned long gcd(unsigned long a, unsigned long b) {
if(a == 0 || b == 0) return 0;
while(a != b) {
if(a > b) a -= b;
else b -= a;
}
return a;
}
unsigned long lcm(unsigned long a, unsigned long b) {
if(a == 0 || b == 0) return 0;
return (a / gcd(a, b)) * b;
}
unsigned long main() {
unsigned long a, b;
while(scanf("%d %d", &a, &b) != EOF) {
prunsigned longf("%d %d\n", gcd(a, b), lcm(a, b));
}
}
~
|
main.c: In function 'main':
main.c:23:5: error: unknown type name 'prunsigned'; did you mean 'unsigned'?
23 | prunsigned longf("%d %d\n", gcd(a, b), lcm(a, b));
| ^~~~~~~~~~
| unsigned
main.c:23:22: error: expected declaration specifiers or '...' before string constant
23 | prunsigned longf("%d %d\n", gcd(a, b), lcm(a, b));
| ^~~~~~~~~
main.c:23:33: error: expected declaration specifiers or '...' before 'gcd'
23 | prunsigned longf("%d %d\n", gcd(a, b), lcm(a, b));
| ^~~
main.c:23:44: error: expected declaration specifiers or '...' before 'lcm'
23 | prunsigned longf("%d %d\n", gcd(a, b), lcm(a, b));
| ^~~
main.c: At top level:
main.c:26:1: error: expected identifier or '(' before '~' token
26 | ~
| ^
|
s959806510
|
p00005
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned long gcd(unsigned long a, unsigned long b) {
if(a == 0 || b == 0) return 0;
while(a != b) {
if(a > b) a -= b;
else b -= a;
}
return a;
}
unsigned long lcm(unsigned long a, unsigned long b) {
if(a == 0 || b == 0) return 0;
return (a / gcd(a, b)) * b;
}
int main() {
unsigned long a, b;
while(scanf("%d %d", &a, &b) != EOF) {
printf("%d %d\n", gcd(a, b), lcm(a, b));
}
|
main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | }
| ^
|
s926166014
|
p00005
|
C
|
#include <stdio.h>
#include <conio.h>
void main()
{
long long int num1, num2, gcd, lcm, remainder, numerator, denominator;
scanf("%lld %lld", &num1,&num2);
if (num1 > num2)
{
numerator = num1;
denominator = num2;
}
else
{
numerator = num2;
denominator = num1;
}
remainder = num1 % num2;
while(remainder !=0)
{
numerator = denominator;
denominator = remainder;
remainder = numerator % denominator;
}
gcd = denominator;
lcm = num1 * num2 / gcd;
printf("%lld %lld\n",gcd, lcm);
return 0;
}
|
main.c:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s400841100
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int a,b;
int tmp;
int GCD,LCM;
while(scanf("%d %d",&a,&b)!=EOF)
{
if(a>b){tmp=a; a=b; b=tmp;}//sort as a<b
while(1)
{
if(a==0){GCD = b; break;}
tmp = n; n = m%n; m = tmp;
}
LCM = a*b/GCD;
printf("%d %d\n",GCD,LCM);
}
return 0;
}
|
main.c: In function 'main':
main.c:16:17: error: 'n' undeclared (first use in this function)
16 | tmp = n; n = m%n; m = tmp;
| ^
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:24: error: 'm' undeclared (first use in this function)
16 | tmp = n; n = m%n; m = tmp;
| ^
|
s365160680
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int a,b;
int tmp;
int GCD,LCM;
while(scanf("%d %d",&a,&b)!=EOF)
{
if(a>b){tmp=a; a=b; b=tmp;}//sort as a<b
while(1)
{
if(a==0){GCD = b; break;}
tmp = n; n = m%n; m = tmp;
}
LCM = a*b/GCD;
printf("%d %d\n",GCD,LCM);
}
return 0;
}
|
main.c: In function 'main':
main.c:16:17: error: 'n' undeclared (first use in this function)
16 | tmp = n; n = m%n; m = tmp;
| ^
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:24: error: 'm' undeclared (first use in this function)
16 | tmp = n; n = m%n; m = tmp;
| ^
|
s736270192
|
p00005
|
C
|
#include<iostream>
using namespace std;
long long gcd(long long a,long long b)
{
if(b==0) return a;
else return gcd(b,a%b);
}
int main()
{
long long a,b,ans;
while (cin>>a>>b)
{
ans=gcd(a,b);
cout<<ans<<" "<<a*b/ans<<endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s180344656
|
p00005
|
C
|
#include<stdio.h>
#include<stdlib.h>
int main()
{
log long int num1,num2,num;
while(scanf("%lld %lld",num1,&num2)!=EOF){
num=num1*num2;
while(num1 !=num2)
if(num1>num2)
num1=num1-num2;
else
num2=num2-num1;
}
printf("%lld %dll\n",num1,num/num1);
return 0;
}
|
main.c: In function 'main':
main.c:6:3: error: 'log' undeclared (first use in this function); did you mean 'ulong'?
6 | log long int num1,num2,num;
| ^~~
| ulong
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:6: error: expected ';' before 'long'
6 | log long int num1,num2,num;
| ^~~~~
| ;
main.c:7:27: error: 'num1' undeclared (first use in this function)
7 | while(scanf("%lld %lld",num1,&num2)!=EOF){
| ^~~~
main.c:7:33: error: 'num2' undeclared (first use in this function)
7 | while(scanf("%lld %lld",num1,&num2)!=EOF){
| ^~~~
main.c:8:3: error: 'num' undeclared (first use in this function)
8 | num=num1*num2;
| ^~~
|
s260211080
|
p00005
|
C
|
#include<stdio.h>
#include<stdlib.h>
int main()
{
log long int num1,num2,num;
while(scanf("%lld %lld",num1,&num2)!=EOF){
num=num1*num2;
while(num1 !=num2)
if(num1>num2)
num1=num1-num2;
else
num2=num2-num1;
}
printf("%lld %dll\n",num1,num/num1);
return 0;
}
|
main.c: In function 'main':
main.c:6:3: error: 'log' undeclared (first use in this function); did you mean 'ulong'?
6 | log long int num1,num2,num;
| ^~~
| ulong
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:6: error: expected ';' before 'long'
6 | log long int num1,num2,num;
| ^~~~~
| ;
main.c:7:27: error: 'num1' undeclared (first use in this function)
7 | while(scanf("%lld %lld",num1,&num2)!=EOF){
| ^~~~
main.c:7:33: error: 'num2' undeclared (first use in this function)
7 | while(scanf("%lld %lld",num1,&num2)!=EOF){
| ^~~~
main.c:8:3: error: 'num' undeclared (first use in this function)
8 | num=num1*num2;
| ^~~
|
s289440966
|
p00005
|
C
|
#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
int d(int n,int m)
{
int t;
while(m!=0)
{
if(n<m) {t=n;n=m;m=t;}
t=m;
m=n%m;
n=t;
}
return n;
}
int main()
{
int t,n,m;
while(1)
{
scanf("%d %d",&n,&m);
t=d(n,m);
printf("%d %d",t,n/t*m);
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s403800665
|
p00005
|
C
|
#include<stdio.h>
#include<algorithm>
using namespace std;
int i;
int js(int x,int y)
{
for(i=1; ;i++)
{
if(i%x==0&&i%y==0)
{
break;
}
}
return i;
}
main()
{
int n,k,j,max,min,x,y,t;
while(~scanf("%d %d",&x,&y))
{
max=js(x,y);
if(x>y)
{
t=x;
x=y;
y=t;
}
while(x!=0)
{
t=x;
x=y%x;
y=t;
}
min=y;
printf("%d %d\n",min,max);
}
}
|
main.c:2:9: fatal error: algorithm: No such file or directory
2 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s019922985
|
p00005
|
C
|
#include<stdio.h>
int text1(int a, int b)
{
int t = a;
if (a<b)
{
t = b;
b = a;
a = t;
}
while (a%b)
{
a += t;
}
return a;
}
int text2(int a, int b)
{
int t;
if (a<b)
{
t = b;
b = a;
a = t;
}
while (a%b)
{
t = a%b;
a = b;
b = t;
}
return b;
}
int main()
{
int a[4];
for(int i=0;i<4;i+=2)
scanf("%lld%llu",&a[i],&a[i+1]);
for( i=0;i<4;i+=2)
printf("%lld %llu\n",text2(a[i],a[i+1]),text1(a[i],a[i+1]));
return 0;
}
|
main.c: In function 'main':
main.c:39:14: error: 'i' undeclared (first use in this function)
39 | for( i=0;i<4;i+=2)
| ^
main.c:39:14: note: each undeclared identifier is reported only once for each function it appears in
|
s237029143
|
p00005
|
C
|
#include <stdio.h>
#include <math.h>
long gcd(long a, long b);
long lcm(long a, long b);
int main(void){
long a,b;
long gcd, lcm;
while(1){
a = -1;
scanf("%ld %ld", &a, &b);
if(a == -1)break;
gcd = gcd(a, b);
lcm = lcm(a, b);
printf("%ld %ld\n", gcd, lcm);
}
return 0;
}
long gcd(long a, long b) {
long v0 = a, v1 = b, v2 = a % b;
while (v2 != 0) {
v0 = v1;
v1 = v2;
v2 = v0 % v1;
};
return v1;
}
long lcm(long a, long b) {
return a * b / gcd(a, b);
}
|
main.c: In function 'main':
main.c:16:15: error: called object 'gcd' is not a function or function pointer
16 | gcd = gcd(a, b);
| ^~~
main.c:9:10: note: declared here
9 | long gcd, lcm;
| ^~~
main.c:17:15: error: called object 'lcm' is not a function or function pointer
17 | lcm = lcm(a, b);
| ^~~
main.c:9:15: note: declared here
9 | long gcd, lcm;
| ^~~
|
s830967902
|
p00005
|
C
|
#include <stdio.h>
int main(){
int a, b ca, cb ,i;
while(scanf("%d%d",&a,&b) != EOF){
ca = a;
cb = b;
while(1){
if(ca > cb) ca = ca - cb;
if(cb > ca) cb = cb - ca;
if(ca == cb) break;
}
i = (a / ca) * b;
printf("%d %d\n",ca, i );
}
return 0;
}
|
main.c: In function 'main':
main.c:3:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ca'
3 | int a, b ca, cb ,i;
| ^~
main.c:4:32: error: 'b' undeclared (first use in this function)
4 | while(scanf("%d%d",&a,&b) != EOF){
| ^
main.c:4:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:17: error: 'ca' undeclared (first use in this function); did you mean 'a'?
5 | ca = a;
| ^~
| a
main.c:6:17: error: 'cb' undeclared (first use in this function)
6 | cb = b;
| ^~
main.c:12:17: error: 'i' undeclared (first use in this function)
12 | i = (a / ca) * b;
| ^
|
s046177821
|
p00005
|
C
|
#include<stdio.h>
int main(void){
int a,b,c;
int g,l,r;
while(scanf("%d%d",&a,&b)==2){
l=a*b;
while(a%b!=0){
c=b;
b=a%b;
a=c;
}
g=b;
printf("%d%d\n",&g,&l/g);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:38: error: invalid operands to binary / (have 'int *' and 'int')
13 | printf("%d%d\n",&g,&l/g);
| ~~^
| |
| int *
|
s783736932
|
p00005
|
C
|
#include<stdio.h>
int main(void){
int a,b,c,d,e;
int g,l,r;
while(scanf("%d%d",&d,&e)==2){
l=d*e;
if(d!=e){
a=d>e?d:e;
b=d>e?e:d;
while(a%b!=0){
c=b;
b=a%b;
a=c;
}
g=b;
}
else {
g=d;
printf("%d %d\n",g,l/g);
}
return 0;
}
|
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
|
s820194322
|
p00005
|
C
|
#include<stdio.h>
int main(void){
int x,y,i;
while(scanf("%d%d",&x,&y)!=EOF){
i=2;
if(x%2!=0&&y%2!=0){i=3;
for(;;i+=2){if(x%i==0&&y%i==0)break;}]
printf("%d %d\n",i,x*y/i);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:54: error: expected statement before ']' token
7 | for(;;i+=2){if(x%i==0&&y%i==0)break;}]
| ^
main.c:11:1: error: expected declaration or statement at end of input
11 | }
| ^
|
s245816307
|
p00005
|
C
|
#include <algorithm>
#include <iostream>
#include <typeinfo>
int main() {
int total_time;
std::cin >> total_time;
int min_price;
std::cin >> min_price;
int max_profit = std::numeric_limits<int>::min();
for (auto t = 1; t < total_time; t++) {
int price;
std::cin >> price;
max_profit = std::max(max_profit, price - min_price);
min_price = std::min(min_price, price);
}
std::cout << max_profit << '\n';
return 0;
}
|
main.c:1:10: fatal error: algorithm: No such file or directory
1 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s033289173
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <string>
#include <set>
#define ll long long
#define x first
#define y second
#define inf 0x3f3f3f3f
//const int N
using namespace std;
ll gcd(ll a,ll b)
{
while(b!=0)
{
ll m=a%b;
a=b;
b=m;
}
return a;
}
int main()
{ ll a,b;
while(scanf("%lld%lld",&a,&b)==2)
{ ll ans=gcd(a,b);
printf("%lld %lld",ans,a/ans*b);
printf("\n");
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s363783521
|
p00005
|
C
|
#include<stdio.h>
int gcd(int x,int y){
????????if(x==0)return y;
????????return gcd(y%x,x);
}
int main(void){
????????int i,a,b,c;
????????while(scanf("%d%d",&a,&b)!=EOF){
????????????????c=gcd(a,b);
????????????????printf("%d %d\n",c,a/c*b);
????????}
????????return 0;
}
|
main.c: In function 'gcd':
main.c:3:1: error: expected expression before '?' token
3 | ????????if(x==0)return y;
| ^
main.c:4:1: error: expected expression before '?' token
4 | ????????return gcd(y%x,x);
| ^
main.c: In function 'main':
main.c:7:1: error: expected expression before '?' token
7 | ????????int i,a,b,c;
| ^
main.c:8:1: error: expected expression before '?' token
8 | ????????while(scanf("%d%d",&a,&b)!=EOF){
| ^
|
s292863555
|
p00005
|
C
|
#include<stdio.h>
int calc_gcd(int, int);
int calc_lcm(int, int, int);
int main(void) {
int a, b, gcd, lcm;
while(scanf("%d %d", &a, &b) != EOF) {
if(a <= b) gcd = calc_gcd(a, b);
else gcd = calc_gcd(b, a);
lcm = calc_lcm(a, b, gcd);
printf("%d %d\n", gcd, lcm);
}
return 0;
}
int calc_gcd(int small, int large) {
if(large % small == 0) return small;
int gcd = small / 2;
while(gcd >= 1) {
if((small % gcd == 0) && (large % gcd == 0)) break;
gcd--;
}
return gcd;
}
int calc_lcm(int p, int q, int gcd) {
return p * q / gcd;
}
~
|
main.c:34:1: error: expected identifier or '(' before '~' token
34 | ~
| ^
|
s353044486
|
p00005
|
C
|
#include<stdio.h>
void swap(int *a,int *b){
int tmp = *a;
*a = *b;
*b = tmp;
}
int main(void){
int a,b;
while(scanf("%d %d",&a,&b)!= EOF){
if(a < b) swap(&a,&b);
int r = a % b;
int product = a * b;
while(r != 0){
a = b;
b = r;
r = a % b;
}
printf("%d %d\n",b,product/b);
}
????????????return 0;
}
|
main.c: In function 'main':
main.c:22:1: error: expected expression before '?' token
22 | ????????????return 0;
| ^
|
s890333504
|
p00005
|
C
|
#include<iostream>
using namespace std;
int main() {
long long a,b,t,GCD,LCM,t2;
while(cin >> a >> b) {
t2 = a*b;
while(b) {
t = b;
b = a % b;
a = t;
}
GCD = a;
LCM = t2/a;
cout << GCD << " " << LCM << endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s243641818
|
p00005
|
C
|
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
long long gcd(long long a, long long b)
{
if (b == 0) return a;
else
return gcd(b, a%b);
}
//long long lcm(long long a, long long b)
//{
// return a*b
//}
int main()
{
long long a, b;
while (~scanf("%lld%lld", &a, &b))
{
long long temp = gcd(a, b);
printf("%lld %lld\n", temp, a*b / temp);
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s634355048
|
p00005
|
C
|
#include<stdio.h>
int main()
{
int a,b,mul;
printf("Enter number:");
scanf("%d%d",&a,&b);
if(0 < a, b ? 2,000,000,000!=EOF)
if(a,b<=50)
{
mul=a*b;
printf("%d",mul);
}
else
printf("Input invalid");
return 0;
}
|
main.c: In function 'main':
main.c:7:37: error: expected ':' before ')' token
7 | if(0 < a, b ? 2,000,000,000!=EOF)
| ^
|
s204142076
|
p00005
|
C
|
#include<stdio.h>
int main()
{
int num1,num2,i,gcd,lcm;
while(scanf("%d %d\n",&num1,&num2)!=EOF)
{
for(i=2;i<=num1&&i<=num2;i++)
{
if(num1%i==0&&num2%i==0)
gcd=i;
}
lcm=(num1×num2)/gcd;
printf("%d %d\n",gcd,lcm);
}
return 0;
}
|
main.c: In function 'main':
main.c:12:26: error: stray '\303' in program
12 | lcm=(num1<U+00D7>num2)/gcd;
| ^~~~~~~~
main.c:12:26: error: expected ')' before 'num2'
12 | lcm=(num1×num2)/gcd;
| ~ ^~~~~
| )
|
s854269939
|
p00005
|
C
|
#include<stdio.h>
int max(int a, int b){
return (a > b) ? a : b;
}
int calcGCD(int a, int b){
int _min, _max, r;
_max = max(a, b);
_min = min(a, b);
r = _max % _min;
while(r != 0){
_max = _min;
_min = r;
r = _max%_min;
}
return _min;
}
int calcLCM(int a, int b){
int GCD, LCM;
GCD = calcGCD(a, b);
LCM = a * b / GCD;
return LCM;
}
int main(){
int a, b;
int list[50][2];
int j = 0;
while(scanf("%d%d", &a, &b)!=EOF){
list[j][0] = calcGCD(a, b);
list[j][1] = calcLCM(a, b);
j+=1;
}
int i;
for(i=0; i<j; i++){
printf("%d %d\n", list[i][0], list[i][1]);
}
return 0;
}
|
main.c: In function 'calcGCD':
main.c:9:10: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
9 | _min = min(a, b);
| ^~~
|
s783364350
|
p00005
|
C
|
#include<stdio.h>
int max(int a, int b){
return (a > b) ? a : b;
}
int min(int a, int b){
return (a < b) ? a : b;
}
int calcGCD(int a, int b){
int _min, _max, r;
_max = max(a, b);
_min = min(a, b);
r = _max % _min;
while(r != 0){
_max = _min;
_min = r;
r = _max%_min;
}
return _min;
}
int calcLCM(int a, int b){
int GCD, LCM;
GCD = calcGCD(a, b);
LCM = a * b / GCD;
return LCM;
}
int main(){
int a, b;
int list[50][2];
int j = 0;
while(scanf("%d%d", &a, &b)!=EOF){
list[j][0] = calcGCD(a, b);
list[j][1] = calcLCM(a, b);
j+=1;
}
int i;
for(i=0; i<j; i++){
printf("%d %d\n", list[i][0], list[i][1]);
}
return 0;
}
|
main.c:10:1: error: stray '\343' in program
10 | <U+3000>
| ^~~~~~~~
|
s215935918
|
p00005
|
C
|
#include <stdio.h>
int main(void){
long long a, b, gcd, lcm;
long long i, tmp;
while (scanf("%lld %lld", &a, &b), != EOF){
if (a > b){
i = a;
gcd = b;
tmp = 1;
}
if (b > a){
i = b;
gcd = a;
tmp = 1;
}
if (a == b){
gcd = a;
tmp = 0;
}
while (tmp){
tmp = i%gcd;
i = gcd;
if (tmp) gcd = tmp;
}
lcm = a*b/gcd;
printf("%lld %lld\n", gcd, lcm);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:44: error: expected expression before '!=' token
7 | while (scanf("%lld %lld", &a, &b), != EOF){
| ^~
|
s536627167
|
p00005
|
C
|
//
// main.cpp
// LearingACM
//
// Created by Niocle.
// Copyright ? 2017年 Niocle. All rights reserved.
//
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <sstream>
using namespace std;
long long gcd(long long a,long long b)
{
if(b==0) return a;
return gcd(b,a%b);
}
int main(int argc, const char * argv[]) {
long long a,b;
while(cin>>a>>b){
long long g=gcd(a,b);
cout<<g<<' '<<a/g*b<<endl;
}
return 0;
}
|
main.c:9:10: fatal error: iostream: No such file or directory
9 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s923645487
|
p00005
|
C
|
int main(void)
{
int a,b,f,s,gcd,lcm,temp;
while(1){
if(scanf("%d %d",&a,&b)==EOF)
return(0);
if(a<b){
f=b;s=a;}
else{
f=a;s=b;}
while(f%s!=0){
temp=f%s;
f=s;
s=temp;
}
gcd=s;
lcm = a/gcd*b;
printf("%d %d\n",gcd,lcm);
}
return(0);
}
|
main.c: In function 'main':
main.c:7:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | if(scanf("%d %d",&a,&b)==EOF)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(void)
main.c:7:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | if(scanf("%d %d",&a,&b)==EOF)
| ^~~~~
main.c:7:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:30: error: 'EOF' undeclared (first use in this function)
7 | if(scanf("%d %d",&a,&b)==EOF)
| ^~~
main.c:7:30: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
22 | printf("%d %d\n",gcd,lcm);
| ^~~~~~
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s863733334
|
p00005
|
C
|
#include<stdio.h>
int main(void){
int a,b,i=1,gcd,lcm;
while(scanf("%d %d\n",&a,&b) !=EOF){
while(i<=a && i<=b){
if(a%i==0 && b%i==0) gcd=i;
i++;
}
lcm=a*b/gcd;
printf("%d %d\n",gcd,lcm);
return 0;
}
|
main.c: In function 'main':
main.c:13:1: error: expected declaration or statement at end of input
13 | }
| ^
|
s335185667
|
p00005
|
C
|
#include<stdio.h>
int main(void){
int a,b,c,d,e,lcm;
while(scanf("%d %d\n",&a,&b) !=EOF){
d=a,e=b
if(a<b) c=a,a=b,b=c;
while(a%b!=0){
c=a%b,a=b,b=c;
}
lcm=d*e/b;
printf("%d %d\n",b,lcm);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:8: error: expected ';' before 'if'
6 | d=a,e=b
| ^
| ;
7 | if(a<b) c=a,a=b,b=c;
| ~~
|
s634878621
|
p00005
|
C
|
#include <stdio.h>
int main(void){
int a,b,c,d,gcd,lcf;
while(scanf("%d %d",&a,&b)!=EOF)
{
d=a*b
if(a<b) c=a,a=b,b=c;
while(a%b!=0) c=a%b,a=b,b=c;
gcd=b,lcm=d/gcd;
printf("%d %d",gcd,lcm);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:6: error: expected ';' before 'if'
7 | d=a*b
| ^
| ;
8 | if(a<b) c=a,a=b,b=c;
| ~~
main.c:10:7: error: 'lcm' undeclared (first use in this function); did you mean 'lcf'?
10 | gcd=b,lcm=d/gcd;
| ^~~
| lcf
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
|
s404761418
|
p00005
|
C
|
#include <stdio.h>
int main(void){
int a,b,c,d,gcd,lcf;
while(scanf("%d %d",&a,&b)!=EOF)
{
d=a*b;
if(a<b) c=a,a=b,b=c;
while(a%b!=0) c=a%b,a=b,b=c;
gcd=b,lcf=d/gcd;
printf("%d %d",gcd,lcd);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:20: error: 'lcd' undeclared (first use in this function); did you mean 'lcf'?
11 | printf("%d %d",gcd,lcd);
| ^~~
| lcf
main.c:11:20: note: each undeclared identifier is reported only once for each function it appears in
|
s474997297
|
p00005
|
C
|
#include <stdio.h>
int getGCD(int a,int b){
int i,temp,r;
if(a < b){
temp = a;
a = b;
b = temp;
}
/*
for(i = a; i > 0 ; i--){
if(a % i == 0 && b % i == 0)
return i;
}*/
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
return 0;
}
int getLCM(int a,int b){
int lcm;
int gcd = getGCD(a, b);
lcm = (a * b) / gcd;
return lcm;
}
int main(void){
int a,b;
while(scanf("%d %d", &a, &b) != EOF){
printf("%d %d\n", getGCD(a, b), getLCM(a, b));
}
return 0;
}
|
main.c: In function 'getGCD':
main.c:45:1: error: expected declaration or statement at end of input
45 | }
| ^
|
s021405287
|
p00005
|
C
|
int calcGCD(int a,int b){
//??????????????????????????????
int temp,i,r;
//??????a???????????§???????????????????????????
if(a < b){
temp = a;
a = b;
b = temp;
}
while(1){
r = a % b;
if(r == 0) break;
a = b; b = r;
}
return b;
}
long calcLCM(int a,int b){
return ((long)a * b) / calcGCD(a, b);
}
int main(void){
int a,b;
while(scanf("%d %d", &a, &b) != EOF){
printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
}
return 0;
}
|
main.c: In function 'main':
main.c:25:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
25 | while(scanf("%d %d", &a, &b) != EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int calcGCD(int a,int b){
main.c:25:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
25 | while(scanf("%d %d", &a, &b) != EOF){
| ^~~~~
main.c:25:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:25:37: error: 'EOF' undeclared (first use in this function)
25 | while(scanf("%d %d", &a, &b) != EOF){
| ^~~
main.c:25:37: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:25:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
26 | printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
| ^~~~~~
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:28: error: implicit declaration of function 'getGCD' [-Wimplicit-function-declaration]
26 | printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
| ^~~~~~
main.c:26:42: error: implicit declaration of function 'getLCM' [-Wimplicit-function-declaration]
26 | printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
| ^~~~~~
|
s072146466
|
p00005
|
C
|
import fileinput
for line in fileinput.input():
tokens = list(map(int, line.strip().split()))
a, b = tokens[0], tokens[1]
d = a * b
if a < b:
tmp = a
a = b
b = tmp
c = a % b
while(c != 0):
a = b
b = c
c = a % b
g = b
l = d / g
print(str(g)+" "+str(int(l)))
|
main.c:1:1: error: unknown type name 'import'
1 | import fileinput
| ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
3 | for line in fileinput.input():
| ^~~
|
s713096796
|
p00005
|
C
|
#include<stdio.h>
int main(){
long long int a,b,A1,B1,A2,B2;
int i
for(i=0;i<50;i++){
scanf("%lld %lld",&a,&b);
A1=a;A2=a;B1=b;B2=b;
for(;;){
if(A1<B1){B1=B1-A1;}else if(A1>B1){A1=A1-B1;}//?????§??¬?´???°
if(A2<B2){A2=A2+a;}else if(A2>B2){B2=B2+b;}//????°???¬?????°
if(A1==B1&&A2==B2){break;}
}
printf("%lld %lld\n",A1,A2);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
5 | for(i=0;i<50;i++){
| ^~~
main.c:5:13: error: 'i' undeclared (first use in this function)
5 | for(i=0;i<50;i++){
| ^
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
|
s418590463
|
p00005
|
C
|
#include<iostream>
#include<stdio.h>
using namespace std;
long int GCD(long int a,long int b)
{
long int c;
c=a%b;
a=b;
b=c;
if(c==0)
return a;
else
return GCD(a,b);
}
long int LCM(long int a,long int b)
{
return a/GCD(a,b)*b;
}
int main()
{
long int a,b;
while(scanf("%ld%ld",&a,&b)!=EOF)
{
cout<<GCD(a,b)<<" "<<LCM(a,b)<<endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s161681760
|
p00005
|
C
|
#include<iostream>
#include<stdio.h>
using namespace std;
int GCD(int a,int b)
{
int c;
c=a%b;
a=b;
b=c;
if(c==0)
return a;
else
return GCD(a,b);
}
int LCM(int a,int b)
{
return a/GCD(a,b)*b;
}
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{
cout<<GCD(a,b)<<" "<<LCM(a,b)<<endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s250468393
|
p00005
|
C
|
// 第二周作?(1).c : 定?控制台?用程序的入口点。
//
//#include "stdafx.h"
#include<stdio.h>
#include<math.h>
using namespace std;
int main()
{
long int a, b, c,x,y;
while (scanf("%ld%ld", &a, &b) != EOF)
{
//a = (int)fabs(a);
//b = (int)fabs(b); //?保下面?算?a和b大于0;
x = a;
y = b;
if (a < b)
{
c = a;
a = b;
b = c;
} //?保循??a>b;
while (b != 0)
{
c = a;
a = b;
b = c%a;
}
c = x*y / a;
printf("%ld,%ld\n", a,c);
}
return 0;
}
|
main.c:7:1: error: unknown type name 'using'
7 | using namespace std;
| ^~~~~
main.c:7:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
7 | using namespace std;
| ^~~
|
s804391182
|
p00005
|
C
|
#include"stadio.h"
#include "stdlib.h"
int gcd(int m, int n) {
if (n == 0)
return m;
else
return (gcd(n, m%n));
}
int main()
{
double x,m,n,y;
while (scanf("%lf %lf",&m,&n)!=EOF)
{
x = gcd(m, n);
y = (m * n) / x;
printf("%.lf %.lf\n", x, y);
}
return 0;
}
|
main.c:1:9: fatal error: stadio.h: No such file or directory
1 | #include"stadio.h"
| ^~~~~~~~~~
compilation terminated.
|
s425579082
|
p00005
|
C
|
#include "stdio.h"
long long int GCD(long long int a, long long int b) //最大公?数
{
long long int n=1,a1,b1;
a1 = a; b1 = b;
while (n != 0)
{
n = a1%b1;
a1 = b1;
b1 = n;
}
return a1;
}
long long int LCM(long long int a, long long int b) //最小公倍数
{
long long int n ;
n = (a*b) / GCD(a, b);
return n;
}
int main()
{
long long int a, b;
while ((scanf_s("%lld %lld", &a, &b)) != EOF)
{
printf("%lld ", GCD(a, b));
printf("%lld\n", LCM(a, b));
}
return 0;
}
|
main.c: In function 'main':
main.c:24:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
24 | while ((scanf_s("%lld %lld", &a, &b)) != EOF)
| ^~~~~~~
| scanf
|
s715317127
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int a,b,w,ax,bx;
int ya,ba,w;
int i,j,on=0;
scanf("%d %d",&a,&b);
if(a<b){
w=a;
a=b;
b=w;
}
ax=a;
bx=b;
for(i=1 ; i<=a ; i++){
a=ax*i;
b=bx;
for(j=1 ; j<a ; j++){
b=bx*j;
if(a==b){
on=1;
ba=a;
break;
}
}
if(on==1)
break;
}
a=ax;
b=bx;
if(a%b==0){
ya=b;
}
else{
for(i=ax ; i>=2 ; i--){
a=ax/i;
b=bx/i;
if(ax%i==0 && bx%i==0){
ya=i;
break;
}
}
}
printf("%d %d\n",ya,ba);
return 0;
}
|
main.c: In function 'main':
main.c:6:19: error: redeclaration of 'w' with no linkage
6 | int ya,ba,w;
| ^
main.c:5:17: note: previous declaration of 'w' with type 'int'
5 | int a,b,w,ax,bx;
| ^
|
s294288332
|
p00005
|
C
|
#include <iostream>
using namespace std;
long long gcd(long long a, long long b)
{
if (b == 0)return a;
return gcd(b, a%b);
}
long long lcm(long long a, long long b)
{
return a * b / gcd(a, b);
}
int main(int argc, char *argv[])
{
long long a, b;
while (cin >> a >> b)
{
cout << gcd(a, b) << " " << lcm(a, b) << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s584684458
|
p00005
|
C
|
E - gcd
All Copyright Reserved ?2010-2017 Xu Han
Server Time: 2017-12-27 12:14:02 BST
#12082272 | Polash_brur's solution for [Problem E]
Status
Compile Error
Length
467
Lang
C
Submitted
2017-12-27 12:12:32
Shared
code.c: In function ‘main’:
code.c:21:18: error: expected expression before ‘%’ token
printf(%llu %llun",gcd,lcm);
^
code.c:21:18: error: stray ‘’ in program
code.c:21:18: error: missing terminating " character
code.c:22:10: error: expected ‘;’ before ‘}’ token
}
^
Select Code
#include<stdio.h>
int main()
{
unsigned long long int a,b,t,x,gcd;
while(scanf("%llu %llu",&a,&b)!=EOF)
{
unsigned long long int lcm,m=a,k=b;
if(a==0) gcd=a;
else if(b==0) gcd=b;
else {
while(b!=0)
{
t=b;
b=a%b;
a=t;
}
gcd=a;
}
lcm=m*k/gcd;
printf("%llu %llu\n",gcd,lcm);
}
return 0;
}
|
main.c:1:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
1 | E - gcd
| ^
main.c:7:11: error: "|" is not a valid filename
7 | #12082272 | Polash_brur's solution for [Problem E]
| ^
main.c:7:24: warning: missing terminating ' character
7 | #12082272 | Polash_brur's solution for [Problem E]
| ^
main.c:18:21: error: stray '\342' in program
18 | code.c: In function <U+2018>main<U+2019>:
| ^~~~~~~~
main.c:18:26: error: stray '\342' in program
18 | code.c: In function <U+2018>main<U+2019>:
| ^~~~~~~~
main.c:19:49: error: stray '\342' in program
19 | code.c:21:18: error: expected expression before <U+2018>%<U+2019> token
| ^~~~~~~~
main.c:19:51: error: stray '\342' in program
19 | code.c:21:18: error: expected expression before <U+2018>%<U+2019> token
| ^~~~~~~~
main.c:20:18: warning: missing terminating " character
20 | printf(%llu %llun",gcd,lcm);
| ^
main.c:20:18: error: missing terminating " character
20 | printf(%llu %llun",gcd,lcm);
| ^~~~~~~~~~~
main.c:22:28: error: stray '\342' in program
22 | code.c:21:18: error: stray <U+2018><U+2019> in program
| ^~~~~~~~
main.c:22:29: error: stray '\342' in program
22 | code.c:21:18: error: stray <U+2018><U+2019> in program
| ^~~~~~~~
main.c:23:42: warning: missing terminating " character
23 | code.c:21:18: error: missing terminating " character
| ^
main.c:23:42: error: missing terminating " character
23 | code.c:21:18: error: missing terminating " character
| ^~~~~~~~~~~
main.c:24:31: error: stray '\342' in program
24 | code.c:22:10: error: expected <U+2018>;<U+2019> before <U+2018>}<U+2019> token
| ^~~~~~~~
main.c:24:33: error: stray '\342' in program
24 | code.c:22:10: error: expected <U+2018>;<U+2019> before <U+2018>}<U+2019> token
| ^~~~~~~~
main.c:24:42: error: stray '\342' in program
24 | code.c:22:10: error: expected <U+2018>;<U+2019> before <U+2018>}<U+2019> token
| ^~~~~~~~
main.c:24:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '}' token
24 | code.c:22:10: error: expected ‘;’ before ‘}’ token
| ^
main.c:24:44: error: stray '\342' in program
24 | code.c:22:10: error: expected <U+2018>;<U+2019> before <U+2018>}<U+2019> token
| ^~~~~~~~
main.c:25:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '}' token
25 | }
| ^
main.c:26:1: error: expected identifier or '(' before '^' token
26 | ^
| ^
In file included from /usr/include/stdio.h:47,
from main.c:28:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | size_t __nbytes);
| ^~~~~~
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
+++ |+#include <stddef.h>
1 | /* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:37:44: error: unknown type name 'size_t'
37 | size_t __nbytes);
| ^~~~~~
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:37:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:57:3: error: unknown type name 'cookie_read_function_t'; did you mean 'cookie_seek_function_t'?
57 | cookie_read_function_t *read; /* Read bytes. */
| ^~~~~~~~~~~~~~~~~~~~~~
| cookie_seek_function_t
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:58:3: error: unknown type name 'cookie_write_function_t'; did you mean 'cookie_close_function_t'?
58 | cookie_write_function_t *write; /* Write bytes. */
| ^~~~~~~~~~~~~~~~~~~~~~~
| cookie_close_function_t
/usr/include/stdio.h:314:35: error: unknown type name 'size_t'
314 | extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
| ^~~~~~
/usr/include/stdio.h:130:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
129 | #include <bits/stdio_lim.h>
+++ |+#include <stddef.h>
130 |
/usr/include/stdio.h:320:47: error: unknown type name 'size_t'
320 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW
| ^~~~~~
/usr/include/stdio.h:320:47: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:340:34: error: unknown type name 'size_t'
340 | int __modes, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/stdio.h:340:34: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:346:24: error: unknown type name 'size_t'
346 | size_t __size) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/stdio.h:346:24: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:385:44: error: unknown type name 'size_t'
385 | extern int snprintf (char *__restrict __s, size_t __maxlen,
| ^~~~~~
/usr/include/stdio.h:385:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:389:45: error: unknown type name 'size_t'
389 | extern int vsnprintf (char *__restrict __s, size_t __maxlen,
| ^~~~~~
/usr/include/stdio.h:389:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:690:30: error: unknown type name 'size_t'
690 | size_t *__restrict __n, int __delimiter,
| ^~~~~~
/usr/include/stdio.h:690:30: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:693:28: error: unknown type name 'size_t'
693 | size_t *__restrict __n, int __delimiter,
| ^~~~~~
/usr/include/stdio.h:693:28: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:698:27: error: unknown type name 'size_t'
698 | size_t *__restrict __n,
| ^~~~~~
/usr/include/stdio.h:698:27: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:728:8: error: unknown type name 'size_t'
728 | extern size_t fread (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:728:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:728:46: error: unknown type name 'size_t'
728 | extern size_t fread (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:728:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:729:22: error: unknown type name 'size_t'
729 | size_t __n, FILE *__restrict __stream) __wur
| ^~~~~~
/usr/include/stdio.h:729:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:735:8: error: unknown type name 'size_t'
735 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:735:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:735:53: error: unknown type name 'size_t'
735 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:735:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:736:23: error: unknown type name 'size_t'
736 | size_t __n, FILE *__restrict __s) __nonnull((4));
| ^~~~~~
/usr/include/stdio.h:736:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:756:8: error: unknown type name 'size_t'
756 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:756:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:756:55: error: unknown type name 'size_t'
756 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:756:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:757:31: error: unknown typ
|
s969757802
|
p00005
|
C
|
#include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
int a,b;
while(scanf("%d %d",a,b) != EOF){
pirntf("%d %d",kouyaku(a,b),koubai(a,b));
}
return 0;
}
int koubai(int a,int b){
int i,bai;
for(i=1;i<=a*b;i++){
if(i%a==0 && i%b==0)
bai =i;
}
return bai;
}
int kouyaku(int a,int b){
int i,yaku;
for(i=1;i<=a || i<=b;i++){
if(a%i==0 && b%i==0)
yaku =i;
}
return yaku
}
|
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
8 | pirntf("%d %d",kouyaku(a,b),koubai(a,b));
| ^~~~~~
| printf
main.c: In function 'kouyaku':
main.c:30:20: error: expected ';' before '}' token
30 | return yaku
| ^
| ;
31 | }
| ~
|
s565019913
|
p00005
|
C
|
#include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
int a,b;
while(scanf("%d %d",a,b) != EOF){
pirntf("%d %d",kouyaku(a,b),koubai(a,b));
}
return 0;
}
int koubai(int a,int b){
int i,bai;
for(i=1;i<=a*b;i++){
if(i%a==0 && i%b==0)
bai =i;
}
return bai;
}
int kouyaku(int a,int b){
int i,yaku;
for(i=1;i<=a || i<=b;i++){
if(a%i==0 && b%i==0)
yaku =i;
}
return yaku;
}
|
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
8 | pirntf("%d %d",kouyaku(a,b),koubai(a,b));
| ^~~~~~
| printf
|
s500742445
|
p00005
|
C
|
include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
int a,b;
while(scanf("%d %d",&a,&b) != EOF){
printf("%d %d\n",kouyaku(a,b),koubai(a,b));
}
return 0;
}
int koubai(int a,int b){
int i;
for(i=1;i<=a*b;i++){
if(i%a==0 && i%b==0)
break;
}
return i;
}
int kouyaku(int a,int b){
int i,yaku;
for(i=1;i<=a || i<=b;i++){
if(a%i==0 && b%i==0)
yaku =i;
}
return yaku;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | include<stdio.h>
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:33: error: 'EOF' undeclared (first use in this function)
7 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~
main.c:7:33: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
8 | printf("%d %d\n",kouyaku(a,b),koubai(a,b));
| ^~~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:35: error: implicit declaration of function 'koubai' [-Wimplicit-function-declaration]
8 | printf("%d %d\n",kouyaku(a,b),koubai(a,b));
| ^~~~~~
|
s734776495
|
p00005
|
C
|
include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
int a,b;
while(scanf("%d %d",&a,&b) != EOF){
printf("%d %d\n",kouyaku(a,b),koubai(a,b));
}
return 0;
}
int koubai(int a,int b){
int i,bai;
for(i=1;i<=a*b;i++){
if(i%a==0 && i%b==0)
bai =i;
break;
}
return i;
}
int kouyaku(int a,int b){
int i,yaku;
for(i=1;i<=a || i<=b;i++){
if(a%i==0 && b%i==0)
yaku =i;
}
return yaku;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | include<stdio.h>
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:33: error: 'EOF' undeclared (first use in this function)
7 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~
main.c:7:33: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
8 | printf("%d %d\n",kouyaku(a,b),koubai(a,b));
| ^~~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:35: error: implicit declaration of function 'koubai' [-Wimplicit-function-declaration]
8 | printf("%d %d\n",kouyaku(a,b),koubai(a,b));
| ^~~~~~
|
s657709650
|
p00005
|
C
|
#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
long long int n,m;
int gcd(long long int a,long long int b)
{
if(b==0)
return a;
return gcd(b,a%b);
}
int main()
{
while(cin>>n>>m)
{
long long int c=gcd(n,m);
long long int d=m*n/c;
cout<<c<<" "<<d<<endl;
}
return 0;
}
|
main.c:2:9: fatal error: cstring: No such file or directory
2 | #include<cstring>
| ^~~~~~~~~
compilation terminated.
|
s053825001
|
p00005
|
C
|
#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
long long a,b;
long long GCD(long long x,long long y)
{
if(x%y==0)return y;
else return GCD(y,x%y);
}
int main()
{
while(cin>>a>>b)
{
cout<<GCD(a,b)<<" "<<a/GCD(a,b)*b<<endl;
}
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s188292222
|
p00005
|
C
|
#include<stdio.h>
long long gcd(long long a,long long b)
{
if(b==0)
return a;
return gcd(b,a%b);
}
int main()
{
long long n,m;
while(scanf("%lld%lld",&n,&m)!=EOF)
{
long long tp=gcd(n,m);
printf("%lld %lld\n",tp,(n/tp)*a);
}
return 0;
}
|
main.c: In function 'main':
main.c:14:48: error: 'a' undeclared (first use in this function)
14 | printf("%lld %lld\n",tp,(n/tp)*a);
| ^
main.c:14:48: note: each undeclared identifier is reported only once for each function it appears in
|
s752847719
|
p00005
|
C
|
#include<iostream>
#include<cstdio>
using namespace std;
int gcd(int a,int b)
{
if(b==0) return a;
return gcd(b,a%b);
}
int lcm(int a,int b)
{
return a/gcd(a,b)*b;
}
int main()
{
int a,b;
while(cin>>a>>b) {
cout<<gcd(a,b)<<" "<<lcm(a,b)<<endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s704012136
|
p00005
|
C
|
1,0,2,0,4,0,8,0,16,0,32,0,64,0,128,0,256,0,512,0,1024,0,2048,0,4096,0,8192,0,16384,0,32768,0,65536,0,131072,0,262144,0,524288,0,48576,0,97152,0,194304,0,388608,0,777216,0,554432,0,108864,0,217728,0,435456,0,870912,0,741824,0,483648,0,967296,0,934592,0,869184,0,738368,0,476736,0,953472,0,906944,0,813888,0,627776,0,255552,0,511104,0,22208,0,44416,0,88832,0,177664,0,355328,0,710656,0,421312,0,842624,0,685248,0,370496,0,740992,0,481984,0,963968,0,927936,0,855872,0,711744,0,423488,0,846976,0,693952,0,387904,0,775808,0,551616,0,103232,0,206464,0,412928,0,825856,0,651712,0,303424,0,606848,0,213696,0,427392,0,854784,0,709568,0,419136,0,838272,0,676544,0,353088,0,706176,0,412352,0,824704,0,649408,0,298816,0,597632,0,195264,0,390528,0,781056,0,562112,0,124224,0,248448,0,496896,0,993792,0,987584,0,975168,0,950336,0,900672,0,801344,0,602688,0,205376,0,410752,0,821504,0,643008,0,286016,0,572032,0,144064,0,288128,0,576256,0,152512,0,305024,0,610048,0,220096,0,440192,0,880384,0,760768,0,521536,0,43072,0,86144,0,172288,0,344576,0,689152,0,378304,0,756608,0,513216,0,26432,0,52864,0,105728,0,211456,0,422912,0,845824,0,691648,0,383296,0,766592,0,533184,0,66368,0,132736,0,265472,0,530944,0,61888,0,123776,0,247552,0,495104,0,990208,0,980416,0,960832,0,921664,0,843328,0,686656,0,373312,0,746624,0,493248,0,986496,0,972992,0,945984,0,891968,0,783936,0,567872,0,135744,0,271488,0,542976,0,85952,0,171904,0,343808,0,687616,0,375232,0,750464,0,500928,0,1856,0,3712,0,7424,0,14848,0,29696,0,59392,0,118784,0,237568,0,475136,0,950272,0,900544,0,801088,0,602176,0,204352,0,408704,0,817408,0,634816,0,269632,0,539264,0,78528,0,157056,0,314112,0,628224,0,256448,0,512896,0,25792,0,51584,0,103168,0,206336,0,412672,0,825344,0,650688,0,301376,0,602752,0,205504,0,411008,0,822016,0,644032,0,288064,0,576128,0,152256,0,304512,0,609024,0,218048,0,436096,0,872192,0,744384,0,488768,0,977536,0,955072,0,910144,0,820288,0,640576,0,281152,0,562304,0,124608,0,249216,0,498432,0,996864,0,993728,0,987456,0,974912,0,949824,0,899648,0,799296,0,598592,0,197184,0,394368,0,788736,0,577472,0,154944,0,309888,0,619776,0,239552,0,479104,0,958208,0,916416,0,832832,0,665664,0,331328,0,662656,0,325312,0,650624,0,301248,0,602496,0,204992,0,409984,0,819968,0,1,0,1,4,6,16,37,92,245,560,1426,3720,9069,22808,58177,145660,366318,925536,331269,872212,802941,311528,38250,999064,348237,640016,761257,393972,951622,989040,435269,293964,416133,521248,251906,476648,977581,756232,897297,306028,499294,523200,187205,532164,262541,505176,268954,19256,787021,244352,574777,51364,426102,756688,843525,718268,12245,326096,202738,62856,187885,362040,551649,315164,573646,976416,408517,425972,70045,916616,188682,70040,429709,702128,938825,91988,48806,163248,631685,432812,138213,509248,330658,493928,370605,111016,111217,118028,963518,371904,82693,215972,56493,639544,76858,149688,149197,532128,729,490116,192662,25040,797573,643100,259509,136816,697746,784136,135725,877848,259137,697020,528238,575200,922821,896532,550205,719080,250346,906584,195917,822288,520745,947508,745990,463536,99141,435468,370565,963104,100354,319976,764717,688776,570257,646508,861214,907264,295173,99140,635405,308568,363674,584248,466957,377920,346873,284964,412854,582864,918213,220860,927893,69968,1330,72392,302381,471288,937761,140444,372814,191776,261957,924468,402973,454920,530570,815704,676877,492848,252873,557972,827110,76656,937605,462636,531749,999296,307042,810216,169069,658600,21489,847884,940990,269248,206725,305828,81901,20984,351994,730488,188301,62240,341913,174404,770390,489104,69957,851164,130357,728368,133842,222536,426221,264152,199041,730556,62510,11232,204421,745428,426301,873448,58602,857496,367949,427216,600489,166580,161350,547952,218757,63628,399365,751328,374402,88872,187501,653896,765777,278764,337886,56960,155525,351556,856397,515736,11482,397368,404237,277312,28665,636388,462390,69968,142533,309820,978197,177488,412658,223944,481965,716600,336929,251164,690062,802208,43589,169460,595677,45128,736522,144152,575181,420336,868937,702484,893798,773104,456261,972844,754789,267328,330018,209704,564589,469480,186161,173708,91646,803584,390789,952356,699885,639480,217146,45752,711501,680352,252825,901124,33046,475024,886981,581724,442805,667312,941138,523912,450029,661272,816321,914684,851822,69088,33093,721300,848893,397352,543658,788696,101325,828240,886633,328116,200838,587504,705605,751756,48837,326048,102530,818024,412717,701384,148177,297580,237406,499456,986757,31876,104269,235736,325530,192056,757581,363328,665977,261476,317878,812944,377477,898236,892693,609104,894322,668744,885485,461816,170209,393884,585998,724832,23557,628,143389,392136,348874,958360,286861,612336,632969,723348,327206,259568,679621,251820,868581,326336,140770,19624,212397,496744,871345,81804,251774,876864,953925,674724,330797,121592,13370,120312,191245,447264,789337,254532,961046,9168,89797,681692,48565,670384,911890,695880,504365,653784,309633,578236,674158,85920,400837,102868,160445,241512,772458,443032,734861,517072,767785,540532,97990,113264,71109,80268,710597,134432,426178,692136,259245,494024,634897,264236,680286,486656,382597,630212,639629,150488,214490,473464,530765,458880,911993,902564,407414,977936,189573,555260,946197,391952,351602,564680,296429,700344,642401,92,320462,79840,818373,298420,558493,874568,844682,135512,232525,228208,520393,992916,623398,100336,713733,736684,356069,645952,530658,713384,924461,871144,787057,336780,791998,700800,361349,86564,429677,393272,563962,589048,352845,267808,665113,33476,648790,176400,227717,488220,578293,556336,346898,991048,492525,447640,297921,725692,85742,796192,450501,734228,578429,204072,164522,877400,701453,824336,316841,291636,275206,889520,346629,37388,1,0,4,0,16,0,136,0,1128,384,8120,6912,60904,75136,491960,720640,23592,828928,819320,472640,471784,543744,221368,155712,876712,369152,747960,457408,713256,600512,483512,244544,123752,122560,617912,202624,602984,677312,883576,496064,845672,384896,666552,161728,759080,327296,22200,728768,378408,522496,450360,72000,917992,663360,610552,19392,340648,986048,154680,32960,656616,353408,259192,318016,744040,470208,211384,533824,670568,359360,224888,556160,330536,807232,76536,3456,602408,62656,493560,338816,277864,482496,340408,80960,752808,13312,854456,943680,769256,151424,538808,547904,133544,101824,14648,447104,89064,273664,8952,131776,643880,176128,679544,802496,947752,252352,426296,988736,875368,36992,953144,44096,289896,737472,429112,850944,810536,533888,786872,627520,331240,956608,606328,804736,577704,420352,181816,292096,309992,108992,280312,459200,279208,98112,557048,222848,739816,969472,973496,280576,15656,366336,617912,659072,238056,448832,327928,797440,821800,46784,809208,883520,749352,945536,152248,984448,631208,203904,972856,167296,706280,10688,923704,180416,660712,36224,497784,111296,250600,443712,581432,669824,335656,229312,676920,705216,227816,93504,802936,175936,42088,250752,828600,548800,613096,607808,797880,708096,932200,782144,255992,960,226152,172544,454840,273280,946984,951808,858104,902464,80168,171392,582264,864192,198184,701376,910072,378048,626536,316864,399992,399936,329256,702528,277816,721280,813480,830464,299000,338112,501288,405824,406776,799424,138408,60224,345144,198464,405992,606720,401912,184256,616104,872640,466552,612864,644648,364992,272248,977280,443240,455872,178104,814976,381544,720960,184888,673920,319336,867264,491576,119360,546344,965888,571064,491904,778408,466816,450936,855808,574568,246592,153912,101888,368808,850112,254904,562560,545512,71104,933688,556352,598376,592256,293624,9600,222632,73088,785784,910208,164456,455424,419960,961280,473896,847424,322744,722752,66472,465024,367224,612992,320360,536448,440568,406144,743720,636288,636920,174080,608936,187136,225272,603456,209960,648896,258936,549568,42856,18496,356408,772096,25640,455232,855160,428736,520872,858816,128568,239424,831080,974528,601528,667136,266856,11136,913208,988928,140328,316608,854968,891264,998056,719552,342520,452416,153512,534144,367992,515584,741928,886016,734392,961344,431016,250112,68216,992640,788072,708544,545208,57600,717736,684928,431800,884416,14248,481408,103224,504192,751720,457152,616120,439552,691176,941568,51640,295488,272424,74688,503480,102912,115880,714816,811448,200512,960872,774528,962488,539008,89832,578112,171256,12864,469224,491264,528952,89088,336936,832,929912,889856,151592,713088,779576,627392,36584,551808,984184,95232,257384,332096,442616,31680,565608,379904,437560,208512,712872,334976,355768,498496,14056,141824,149688,360768,754856,502912,434232,976064,362792,329536,105720,311616,359400,998144,961144,834112,906984,188352,740856,273728,148584,891968,514296,953472,659560,986688,297528,75520,633896,638592,720632,151808,241896,887360,919352,332800,423400,819712,86904,942528,699304,979648,457400,490176,675816,493952,317240,451712,576872,515648,33784,795072,974376,814016,831480,971008,203304,745280,203512,956864,771880,25984,849144,719552,145448,73152,693304,918272,314408,40448,19512,794240,819880,73280,122680,933312,903208,103680,510200,441920,698536,981632,212984,276672,141672,441152,247096,345600,812840,493824,285432,542976,956904,108160,100088,193984,406312,205376,451704,368384,1,0,5,8,37,136,545,2376,10534,46824,212926,961552,374949,888832,570555,561096,381253,76760,502817,531672,845530,380920,403612,855920,804137,231360,778653,367704,430993,273064,638461,201576,495294,339048,964010,642832,905361,253760,369803,663816,631721,492952,253525,889368,897634,918712,330336,550768,472525,992832,38877,61848,87805,348264,873769,673128,272022,208360,902006,63952,348317,939264,226523,358024,269773,950552,33353,563480,161482,463864,325348,754992,850769,274688,41693,532760,625641,170600,14165,632360,344526,730472,341378,908304,160777,380608,591595,532296,563057,921688,691453,435864,443346,177848,850472,652336,705973,462272,747805,118040,955733,807400,28545,766376,263270,682984,2126,788816,355477,450368,129211,290120,783125,818520,672177,411544,985786,575160,103916,669936,861177,157888,250013,172120,427137,544168,278637,480168,922398,395112,532250,366608,686017,351744,96459,250312,977209,309464,408805,161880,478402,646392,577712,945136,711517,397568,107805,467736,448941,968168,753689,905256,502390,406184,652902,644880,746381,20672,930011,807624,350109,502872,170137,807832,292458,118264,45172,403440,585569,415360,735773,813400,441049,208552,509381,719400,461678,123880,370674,655632,422329,832128,848683,536968,194753,628632,402637,177816,594994,169080,759672,760176,380549,121600,692125,470808,664069,681064,264689,601320,59590,582952,687294,626384,301061,620480,585083,526024,992869,143192,760769,483544,713178,104696,12860,174320,661257,261632,925213,873496,855601,209640,102493,926696,499390,364776,730186,141520,880753,556736,70283,64072,464585,99416,621493,309272,730210,23352,997376,760496,169901,370624,243741,619480,359005,297064,196489,757672,237078,534440,252310,50128,364093,248704,223963,108808,106605,822424,234985,268248,928778,847032,453444,888240,837297,912896,568157,481112,764297,356200,294133,552552,645262,314600,711778,13328,756777,965696,45611,44616,85713,315608,814621,319064,688082,232120,46728,228144,675605,402048,105053,328280,646901,129320,679969,285864,526502,399784,272494,146896,853173,614592,983611,277576,119093,556504,33105,328088,237434,516792,223436,895664,85977,684160,639517,221272,127521,570984,121613,532520,788958,480552,915834,691280,888545,410880,674379,377864,406745,391000,563397,91544,972034,767928,230992,722544,220093,642688,109661,751448,403277,716904,96185,473640,123702,591272,316230,961104,806893,320384,992283,537800,758973,211864,973817,83608,264490,526328,341332,763952,714945,233664,192093,480280,625017,244392,130981,486120,776558,998376,792530,941008,597017,561664,677419,953160,825185,700504,615149,169304,405298,940920,711896,717616,486309,436032,579869,687064,703845,776808,394449,653352,262854,943464,338462,892240,357221,696576,269051,216328,711109,179480,502433,28952,951258,755192,395036,525552,967913,234240,165981,381080,151505,570856,337533,241000,797438,181608,144042,309072,19025,129600,525963,888584,553833,514456,53845,688216,457570,736632,357280,654256,8653,377280,576989,472024,690877,546472,486761,402920,237078,822312,746230,676496,842269,148864,97243,425672,296781,515416,541449,502744,230602,284152,806180,76144,164753,557440,694877,896984,17193,924072,928341,33448,824334,249384,749890,286736,946697,894720,250987,558920,939889,967256,208061,910808,335186,528632,162024,670768,620405,809536,34205,394072,525525,507816,54849,112488,835366,245480,141838,154512,280341,90752,183483,438280,645845,849560,256497,69272,170490,929208,657516,792112,757369,684608,260573,887128,141377,228584,569133,175080,1,0,6,0,92,0,2376,5504,71248,253952,175992,140032,393152,186688,850896,293888,361248,951936,350440,283712,578584,509760,206528,7360,45704,78848,68064,204288,407600,655424,666240,845312,211816,865472,428152,335872,957088,461440,340136,786752,923744,535104,197808,41216,482816,442240,582472,549952,692120,190016,846240,739648,833736,416000,732704,576192,69744,229056,37920,799232,933064,98176,263608,776320,564256,160064,120392,251968,897280,101376,760816,178176,856576,77760,746248,822400,859896,762560,680032,852544,546024,659776,718048,757440,538800,451584,961824,399616,452072,36672,747480,12032,777696,922496,500616,621504,248096,933760,153808,864064,349696,12544,935624,224576,909944,679296,614464,604864,626216,183616,394816,237376,880560,583168,793440,446656,783848,826496,587640,678976,511232,549376,701448,692032,944160,537856,644464,62272,805408,785856,754568,809856,344824,462976,53504,282432,135752,198528,601472,939648,493200,345920,19616,963712,559464,578240,228280,813248,277792,491840,147432,993600,218976,870912,104944,377472,222400,587072,857832,625792,225656,756864,688576,36096,58376,568896,253856,655744,843664,400960,275840,753536,624616,844736,605624,853632,141024,281920,689352,46976,966144,946560,146544,869184,505472,204480,280648,4160,696664,900800,404224,601280,686024,271040,161056,443456,752,402432,226560,939584,402696,959552,939384,579072,994144,433344,893384,873088,268128,112896,358864,117760,272704,191936,953672,637760,880248,608384,905568,862784,501960,25600,788832,694208,752,169472,428640,448896,996232,634304,270104,514176,659040,406208,979080,662400,795104,232000,673392,163520,341344,179712,767240,806464,723448,500416,390400,91456,342632,43584,936224,849152,286064,889024,735904,229696,555624,950272,799640,467840,234496,633152,512904,540160,106336,322112,230704,787520,245120,981184,471016,637504,396408,55296,543040,616128,79240,592448,47104,327232,118640,451968,501088,963968,849832,971776,377400,968384,549888,595520,967720,537152,406432,623488,775088,533312,200704,836160,602248,11392,891352,669056,628864,30784,675720,658240,317280,913920,776912,94208,727456,247936,101416,741760,130488,668928,831520,466176,820968,555584,203008,771008,535792,981184,827776,604800,794312,49728,767672,47104,551648,853056,596104,61824,142624,168320,408304,270528,783104,17728,289128,810432,408376,959040,915168,112000,614344,928256,80064,435584,996880,736896,176128,680256,629960,400064,776760,849984,932096,649856,566440,782592,817056,24000,486576,937152,293536,262720,863432,10048,503032,360192,194976,973376,266248,556800,73248,858368,688400,249728,232672,719744,311816,877888,451768,483456,334656,988352,812616,284992,188480,69760,581552,924928,954528,62016,143528,332608,210584,252544,831264,665152,166152,478016,150688,553984,545264,137728,599776,653312,120872,918464,42616,797568,24960,614336,577800,723968,249760,750016,504016,779328,509920,955008,49256,331776,446904,116736,710912,866048,585288,247232,136096,749120,676144,377088,523392,846976,398312,145600,437144,436160,112896,461760,858120,138624,834656,52736,849520,598912,410112,868672,366056,70784,129976,950912,15968,404544,275176,478016,160672,592384,344560,955200,685760,194112,476872,47872,72984,95744,746720,41920,991944,244096,971232,607232,808240,15168,737248,96768,519496,368576,330872,719360,437088,379072,536968,378496,662016,929216,715440,127104,398400,577536,335880,191616,232376,775680,214944,23168,220392,976256,149024,294400,994736,471936,905376,4032,300264,309376,379736,544512,1,0,13,16,245,1128,10534,71248,652036,141408,81311,481816,166909,269104,397799,918208,185192,587200,901534,296720,833007,460552,90734,801832,949211,644656,275357,312824,958438,399112,139088,316680,894122,169816,828288,553536,745631,156776,543298,559272,962018,395360,280035,479664,434610,307184,556153,197744,972754,401752,888545,689976,553473,902560,785781,765552,928213,668240,176690,962112,103709,646312,62277,477784,849131,946552,101076,359984,494518,201480,958373,532576,120925,455328,985951,583160,392690,712200,456192,568656,774821,965592,512656,853488,333795,149696,479111,752320,330898,332016,783362,128432,153760,777448,47780,724488,445267,531408,672014,883928,920952,861488,446487,312720,827916,821168,935199,733792,739250,12584,10951,388712,395411,429120,785707,832,690201,712008,393714,547072,64699,874480,620991,418344,702897,946696,729706,853552,995240,761720,636577,502200,766537,628600,436565,227376,692768,407504,674316,819216,849587,156648,342662,938240,764213,192336,330851,346672,622744,534912,250610,846592,842632,433896,583726,599904,979087,13152,613988,445760,609998,443160,718843,921104,503230,808784,548073,454232,398078,438992,177779,696616,671955,6536,450847,864256,558873,42384,86910,804576,275169,909000,410525,179032,794801,166856,259980,222680,583782,271512,328391,194520,306169,906344,791831,663104,286990,41144,846782,774856,891759,945520,648884,121624,953037,170736,877609,214536,546238,992632,790114,400528,663042,519848,688304,880104,447937,769040,312964,365040,73320,872656,714489,764312,997632,578032,895681,291992,859904,24944,626481,965424,904379,835984,925301,700784,251655,413256,917156,178576,7017,439256,71187,791376,704653,422128,435072,820952,169106,827944,378321,262152,482693,461848,534705,352608,783410,331176,157064,406520,31005,652648,800910,957896,662111,528664,235647,87360,987636,388408,477232,934952,208994,538144,131960,236432,943617,870968,808330,475864,307972,826144,650015,479696,750136,486912,241953,505064,720422,782552,11191,685528,6659,604896,375471,460208,203291,180480,8288,823112,325387,575712,935933,67424,751501,428920,369464,874112,199010,416272,128813,550408,947301,80712,400087,273664,208284,881904,51982,290048,172831,861920,291732,5288,534495,563592,208995,555304,499442,712288,508124,703960,294864,955256,11340,655528,437769,387568,437970,604048,854132,377080,178303,451056,300710,157536,663209,23672,390162,544440,214701,30728,4985,541080,248835,200512,541413,17744,862584,286640,5495,577704,710937,591992,812887,489312,217682,939920,751338,672960,693661,175576,641055,655840,349451,342720,609966,824000,290788,17256,566733,479560,906424,525744,99919,43360,892817,341080,804092,872104,705466,349360,926302,210312,14532,82992,872887,34056,231444,558904,258462,977088,974977,537688,480062,824816,617083,544528,499654,592040,833777,64352,156811,460400,261379,744360,265179,195744,203372,854360,157763,507152,644551,193592,661419,254136,366514,78960,11270,399312,301501,573992,897877,958656,251655,684032,934858,601160,867382,614984,776091,736704,784534,681568,64727,360872,937167,309576,796542,406168,122374,185424,908450,267496,901204,734904,957647,725048,465896,538544,532744,648488,47303,622952,633904,880264,51185,871136,281216,374048,594899,459608,513221,928264,388265,971560,741605,41720,29846,865832,490737,488408,163635,827048,13083,366176,543780,774368,308520,937952,663555,692672,361305,205784,878303,92624,635610,785624,735066,81752,383979,244800,45824,846072,284679,652296,413537,469552,785838,226136,921970,700872,1,0,16,0,560,384,46824,253952,141408,13568,801280,106368,792936,518528,98984,843072,655432,866752,794440,570304,701952,120320,123800,625280,453832,87168,112008,390848,852000,831424,98256,84352,248920,453376,602056,960576,875496,51968,219128,841408,771400,641792,900464,378048,762976,634112,450472,921152,618488,852544,307448,184128,842672,108288,150480,150976,485016,75008,669024,131776,164984,800320,864992,930048,567040,19840,255608,954816,513392,323456,557024,964352,751224,44864,588648,463040,703448,618816,765360,555008,922048,213440,100776,732032,341512,468992,242128,724992,657464,619072,292912,781888,348480,963584,765344,301824,645312,298944,73520,384000,1040,125376,687688,693376,25000,400384,643400,905984,820768,928832,764280,278720,340240,901952,12504,593536,218944,231232,187360,291072,433008,285696,922600,100736,775400,336512,11392,262144,966512,740160,7264,161664,350808,166784,93608,936064,354760,107520,594968,285056,460848,471232,750424,399232,499224,261376,340216,993664,520144,712192,826344,942656,468640,573248,899544,95872,125920,433536,436192,477568,213224,148736,468760,922944,205016,513728,834232,929344,1496,866880,626104,558848,660224,148352,57480,309056,522728,827712,150056,138752,85000,79360,112848,969728,217248,963712,287064,748288,117000,174912,403160,992256,795024,726848,528672,357120,279240,998528,411672,155712,180176,661184,343400,384896,687496,475648,417560,141760,760832,246208,546696,979840,758480,654720,441312,686592,676056,220800,520376,144832,410824,253184,910768,225728,562608,17856,701096,404480,915776,249344,149984,803136,182184,175424,459736,992960,935656,656896,276800,77184,369672,497152,915072,107200,458384,840960,138208,555392,774744,801856,623656,940864,795384,631552,146264,314880,10664,237760,657224,417728,864712,620288,312408,776960,34360,692160,471728,801216,531568,986048,999776,647936,940696,50688,981040,686080,219616,358528,120944,807680,609296,636160,805480,644736,199216,698048,839976,967424,255504,4480,820264,743104,117056,699072,581120,186560,386512,656000,933976,197056,620424,70208,177072,473344,840816,602688,452040,615488,609144,213888,107424,250496,118120,456768,785088,646784,687936,332928,478544,310400,126744,448640,847000,90944,19552,483072,618320,929408,468664,379904,676552,37504,370904,614144,38080,451136,213464,361984,114096,212928,810152,476928,464080,382016,469128,622912,82216,200640,194528,647424,914696,564608,215264,762304,732576,846080,337032,903488,736880,671808,745328,986752,853160,845440,322424,152128,844072,145984,767704,161792,56528,871424,629688,729024,782296,738240,705400,433344,351416,149888,242904,78144,908032,545408,911424,421696,147672,11584,479096,108160,601664,855744,805144,233536,2008,952320,73928,556928,761056,902592,452896,53312,683336,963520,66616,782720,569088,343616,262168,656384,790152,960512,322808,861376,339160,884416,187904,899264,549152,599616,871128,644352,250880,278208,408816,484864,585216,869824,453448,232768,993952,187648,39152,825664,227944,439744,207640,778624,125280,142016,558136,828608,414368,128896,500864,5568,646640,370816,821536,101568,198672,493504,397064,780160,765968,214592,977520,915968,301352,267776,786760,575296,892416,184448,358160,75712,892144,15168,350336,501632,164352,195648,250296,89408,981872,189184,204576,399232,321256,910528,873904,979200,294720,594048,181632,56576,321944,158272,830904,189312,732232,333504,254656,494848,49168,581568,598592,531264,343016,892288,609352,859392,490744,13568,501000,960576,463368,38400,447392,789312,980312,914752,1,0,25,32,1426,8120,212926,175992,81311,801280,714624,768136,290540,400912,673930,397384,99771,893632,335309,871904,407259,543408,79669,842400,876239,938696,655008,787616,128616,335896,428240,119712,497704,115024,955734,9664,385287,909400,400166,474392,848062,706680,638211,489368,706212,935464,265083,433128,376195,592480,224460,727744,290369,683704,35061,308776,389794,463768,706315,679456,444231,430584,198217,504416,802297,821448,735933,343768,683320,374640,2267,913264,888405,933240,112173,50216,154320,992272,225912,458496,115190,287608,947731,429384,254995,506656,850121,426168,573909,300712,859405,96304,223760,589120,344820,572312,967490,84624,748014,722120,119873,420832,593438,720200,874605,896160,874078,291072,971804,71280,276387,630016,11907,114864,782808,724832,665716,6976,911866,250968,969828,584080,2000,594152,234748,162080,862486,684136,804353,542160,572634,882368,454255,523120,184477,298200,664095,672960,97590,749440,318048,417256,847910,569600,951785,23960,186107,370856,864987,306296,25112,958928,675312,283584,77529,936952,699403,989928,598706,599264,780909,117552,540291,628096,976322,263584,439990,291512,714632,117568,555874,838424,623684,401792,804975,132560,780315,674136,173318,651064,254856,168168,27151,795016,93282,346584,704827,442624,296582,934568,794561,299088,522957,210832,278495,847352,742208,452352,207097,999992,698170,794176,809064,677600,891315,235464,829400,817432,737129,329064,172386,57096,865213,559248,188108,437168,972509,19448,850260,261080,672998,311096,26416,309736,236679,28784,452661,640808,938150,970104,746193,266480,983448,131344,65359,90112,412559,24368,19834,437704,497586,590952,51398,48840,282124,341224,895207,778360,349113,383600,490971,901272,857588,685448,876378,992144,569236,964288,451252,480000,495826,4320,433838,285696,755900,379560,709307,196856,733333,781432,785021,938376,152797,237664,538094,227552,370015,17024,342403,582488,834545,983176,69018,221664,383834,293376,837053,727512,115192,139664,385020,177504,656452,132728,818268,119048,297379,886984,637200,874328,398490,284416,391268,24328,99027,76944,554834,370344,91024,637240,39582,522144,436332,16704,989562,817192,37235,29464,493679,439936,213471,567408,536386,174216,317361,554672,561153,431528,163926,760728,432871,774904,318816,217112,947085,246448,282884,274816,938022,887072,925609,832904,712307,522680,713865,602528,315817,538408,221517,854712,745843,815472,115875,629640,431771,762880,638919,558536,694862,728336,725234,441368,837851,258376,984277,945376,122721,780216,910566,273416,861034,852784,637849,966656,131618,773336,520863,463200,609725,656192,583755,675400,977769,580264,497113,459248,927787,883904,279662,290216,196539,355368,329252,835688,477967,718176,222861,168040,908229,459688,99291,630664,605209,514920,725131,322072,527113,484288,5920,354544,306492,275688,517203,846856,105436,46712,556258,57064,590303,439712,200736,636624,639980,454320,197564,876952,187997,783200,828426,757624,516263,389440,683891,93064,394038,736040,29440,821264,692881,11088,64015,412784,34112,898136,591886,477664,291345,131536,194959,480848,84789,573808,109871,431104,128660,897568,913694,830168,361069,69216,450388,23888,128179,607560,233739,385192,656575,596536,450436,724760,497318,324536,55071,971768,933329,168256,864508,236808,971574,745152,934648,156320,573967,991448,554982,293904,560024,770072,417661,451896,671331,959192,617150,647672,769928,467904,779797,675848,947331,817776,713687,536896,766643,22672,303124,60576,435261,431888,883472,480592,922758,950456,
|
main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 1,0,2,0,4,0,8,0,16,0,32,0,64,0,128,0,256,0,512,0,1024,0,2048,0,4096,0,8192,0,16384,0,32768,0,65536,0,131072,0,262144,0,524288,0,48576,0,97152,0,194304,0,388608,0,777216,0,554432,0,108864,0,217728,0,435456,0,870912,0,741824,0,483648,0,967296,0,934592,0,869184,0,738368,0,476736,0,953472,0,906944,0,813888,0,627776,0,255552,0,511104,0,22208,0,44416,0,88832,0,177664,0,355328,0,710656,0,421312,0,842624,0,685248,0,370496,0,740992,0,481984,0,963968,0,927936,0,855872,0,711744,0,423488,0,846976,0,693952,0,387904,0,775808,0,551616,0,103232,0,206464,0,412928,0,825856,0,651712,0,303424,0,606848,0,213696,0,427392,0,854784,0,709568,0,419136,0,838272,0,676544,0,353088,0,706176,0,412352,0,824704,0,649408,0,298816,0,597632,0,195264,0,390528,0,781056,0,562112,0,124224,0,248448,0,496896,0,993792,0,987584,0,975168,0,950336,0,900672,0,801344,0,602688,0,205376,0,410752,0,821504,0,643008,0,286016,0,572032,0,144064,0,288128,0,576256,0,152512,0,305024,0,610048,0,220096,0,440192,0,880384,0,760768,0,521536,0,43072,0,86144,0,172288,0,344576,0,689152,0,378304,0,756608,0,513216,0,26432,0,52864,0,105728,0,211456,0,422912,0,845824,0,691648,0,383296,0,766592,0,533184,0,66368,0,132736,0,265472,0,530944,0,61888,0,123776,0,247552,0,495104,0,990208,0,980416,0,960832,0,921664,0,843328,0,686656,0,373312,0,746624,0,493248,0,986496,0,972992,0,945984,0,891968,0,783936,0,567872,0,135744,0,271488,0,542976,0,85952,0,171904,0,343808,0,687616,0,375232,0,750464,0,500928,0,1856,0,3712,0,7424,0,14848,0,29696,0,59392,0,118784,0,237568,0,475136,0,950272,0,900544,0,801088,0,602176,0,204352,0,408704,0,817408,0,634816,0,269632,0,539264,0,78528,0,157056,0,314112,0,628224,0,256448,0,512896,0,25792,0,51584,0,103168,0,206336,0,412672,0,825344,0,650688,0,301376,0,602752,0,205504,0,411008,0,822016,0,644032,0,288064,0,576128,0,152256,0,304512,0,609024,0,218048,0,436096,0,872192,0,744384,0,488768,0,977536,0,955072,0,910144,0,820288,0,640576,0,281152,0,562304,0,124608,0,249216,0,498432,0,996864,0,993728,0,987456,0,974912,0,949824,0,899648,0,799296,0,598592,0,197184,0,394368,0,788736,0,577472,0,154944,0,309888,0,619776,0,239552,0,479104,0,958208,0,916416,0,832832,0,665664,0,331328,0,662656,0,325312,0,650624,0,301248,0,602496,0,204992,0,409984,0,819968,0,1,0,1,4,6,16,37,92,245,560,1426,3720,9069,22808,58177,145660,366318,925536,331269,872212,802941,311528,38250,999064,348237,640016,761257,393972,951622,989040,435269,293964,416133,521248,251906,476648,977581,756232,897297,306028,499294,523200,187205,532164,262541,505176,268954,19256,787021,244352,574777,51364,426102,756688,843525,718268,12245,326096,202738,62856,187885,362040,551649,315164,573646,976416,408517,425972,70045,916616,188682,70040,429709,702128,938825,91988,48806,163248,631685,432812,138213,509248,330658,493928,370605,111016,111217,118028,963518,371904,82693,215972,56493,639544,76858,149688,149197,532128,729,490116,192662,25040,797573,643100,259509,136816,697746,784136,135725,877848,259137,697020,528238,575200,922821,896532,550205,719080,250346,906584,195917,822288,520745,947508,745990,463536,99141,435468,370565,963104,100354,319976,764717,688776,570257,646508,861214,907264,295173,99140,635405,308568,363674,584248,466957,377920,346873,284964,412854,582864,918213,220860,927893,69968,1330,72392,302381,471288,937761,140444,372814,191776,261957,924468,402973,454920,530570,815704,676877,492848,252873,557972,827110,76656,937605,462636,531749,999296,307042,810216,169069,658600,21489,847884,940990,269248,206725,305828,81901,20984,351994,730488,188301,62240,341913,174404,770390,489104,69957,851164,130357,728368,133842,222536,426221,264152,199041,730556,62510,11232,204421,745428,426301,873448,58602,857496,367949,427216,600489,166580,161350,547952,218757,63628,399365,751328,374402,88872,187501,653896,765777,278764,337886,56960,155525,351556,856397,515736,11482,397368,404237,277312,28665,636388,462390,69968,142533,309820,978197,177488,412658,223944,481965,716600,336929,251164,690062,802208,43589,169460,595677,45128,736522,144152,575181,420336,868937,702484,893798,773104,456261,972844,754789,267328,330018,209704,564589,469480,186161,173708,91646,803584,390789,952356,699885,639480,217146,45752,711501,680352,252825,901124,33046,475024,886981,581724,442805,667312,941138,523912,450029,661272,816321,914684,851822,69088,33093,721300,848893,397352,543658,788696,101325,828240,886633,328116,200838,587504,705605,751756,48837,326048,102530,818024,412717,701384,148177,297580,237406,499456,986757,31876,104269,235736,325530,192056,757581,363328,665977,261476,317878,812944,377477,898236,892693,609104,894322,668744,885485,461816,170209,393884,585998,724832,23557,628,143389,392136,348874,958360,286861,612336,632969,723348,327206,259568,679621,251820,868581,326336,140770,19624,212397,496744,871345,81804,251774,876864,953925,674724,330797,121592,13370,120312,191245,447264,789337,254532,961046,9168,89797,681692,48565,670384,911890,695880,504365,653784,309633,578236,674158,85920,400837,102868,160445,241512,772458,443032,734861,517072,767785,540532,97990,113264,71109,80268,710597,134432,426178,692136,259245,494024,634897,264236,680286,486656,382597,630212,639629,150488,214490,473464,530765,458880,911993,902564,407414,977936,189573,555260,946197,391952,351602,564680,296429,700344,642401,92,320462,79840,818373,298420,558493,874568,844682,135512,232525,228208,520393,992916,623398,100336,713733,736684,356069,645952,530658,713384,924461,871144,787057,336780,791998,700800,361349,86564,429677,393272,563962,589048,352845,267808,665113,33476,648790,176400,227717,488220,578293,556336,346898,991048,492525,447640,297921,725692,85742,796192,450501,734228,578429,204072,164522,877400,701453,824336,316841,291636,275206,889520,346629,37388,1,0,4,0,16,0,136,0,1128,384,8120,6912,60904,75136,491960,720640,23592,828928,819320,472640,471784,543744,221368,155712,876712,369152,747960,457408,713256,600512,483512,244544,123752,122560,617912,202624,602984,677312,883576,496064,845672,384896,666552,161728,759080,327296,22200,728768,378408,522496,450360,72000,917992,663360,610552,19392,340648,986048,154680,32960,656616,353408,259192,318016,744040,470208,211384,533824,670568,359360,224888,556160,330536,807232,76536,3456,602408,62656,493560,338816,277864,482496,340408,80960,752808,13312,854456,943680,769256,151424,538808,547904,133544,101824,14648,447104,89064,273664,8952,131776,643880,176128,679544,802496,947752,252352,426296,988736,875368,36992,953144,44096,289896,737472,429112,850944,810536,533888,786872,627520,331240,956608,606328,804736,577704,420352,181816,292096,309992,108992,280312,459200,279208,98112,557048,222848,739816,969472,973496,280576,15656,366336,617912,659072,238056,448832,327928,797440,821800,46784,809208,883520,749352,945536,152248,984448,631208,203904,972856,167296,706280,10688,923704,180416,660712,36224,497784,111296,250600,443712,581432,669824,335656,229312,676920,705216,227816,93504,802936,175936,42088,250752,828600,548800,613096,607808,797880,708096,932200,782144,255992,960,226152,172544,454840,273280,946984,951808,858104,902464,80168,171392,582264,864192,198184,701376,910072,378048,626536,316864,399992,399936,329256,702528,277816,721280,813480,830464,299000,338112,501288,405824,406776,799424,138408,60224,345144,198464,405992,606720,401912,184256,616104,872640,466552,612864,644648,364992,272248,977280,443240,455872,178104,814976,381544,720960,184888,673920,319336,867264,491576,119360,546344,965888,571064,491904,778408,466816,450936,855808,574568,246592,153912,101888,368808,850112,254904,562560,545512,71104,933688,556352,598376,592256,293624,9600,222632,73088,785784,910208,164456,455424,419960,961280,473896,847424,322744,722752,66472,465024,367224,612992,320360,536448,440568,406144,743720,636288,636920,174080,608936,187136,225272,603456,209960,648896,258936,549568,42856,18496,356408,772096,25640,455232,855160,428736,520872,858816,128568,239424,831080,974528,601528,667136,266856,11136,913208,988928,140328,316608,854968,891264,998056,719552,342520,452416,153512,534144,367992,515584,741928,886016,734392,961344,431016,250112,68216,992640,788072,708544,545208,57600,717736,684928,431800,884416,14248,481408,103224,504192,751720,457152,616120,439552,691176,941568,51640,295488,272424,74688,503480,102912,115880,714816,811448,200512,960872,774528,962488,539008,89832,578112,171256,12864,469224,491264,528952,89088,336936,832,929912,889856,151592,713088,779576,627392,36584,551808,984184,95232,257384,332096,442616,31680,565608,379904,437560,208512,712872,334976,355768,498496,14056,141824,149688,360768,754856,502912,434232,976064,362792,329536,105720,311616,359400,998144,961144,834112,906984,188352,740856,273728,148584,891968,514296,953472,659560,986688,297528,75520,633896,638592,720632,151808,241896,887360,919352,332800,423400,819712,86904,942528,699304,979648,457400,490176,675816,493952,317240,451712,576872,515648,33784,795072,974376,814016,831480,971008,203304,745280,203512,956864,771880,25984,849144,719552,145448,73152,693304,918272,314408,40448,19512,794240,819880,73280,122680,933312,903208,103680,510200,441920,698536,981632,212984,276672,141672,441152,247096,345600,812840,493824,285432,542976,956904,108160,100088,193984,406312,205376,451704,368384,1,0,5,8,37,136,545,2376,10534,46824,212926,961552,374949,888832,570555,561096,381253,76760,502817,531672,845530,380920,403612,855920,804137,231360,778653,367704,430993,273064,638461,201576,495294,339048,964010,642832,905361,253760,369803,663816,631721,492952,253525,889368,897634,918712,330336,550768,472525,992832,38877,61848,87805,348264,873769,673128,272022,208360,902006,63952,348317,939264,226523,358024,269773,950552,33353,563480,161482,463864,325348,754992,850769,274688,41693,532760,625641,170600,14165,632360,344526,730472,341378,908304,160777,380608,591595,532296,563057,921688,691453,435864,443346,177848,850472,652336,705973,462272,747805,118040,955733,807400,28545,766376,263270,682984,2126,788816,355477,450368,129211,290120,783125,818520,672177,411544,985786,575160,103916,669936,861177,157888,250013,172120,427137,544168,278637,480168,922398,395112,532250,366608,686017,351744,96459,250312,977209,309464,408805,161880,478402,646392,577712,945136,711517,397568,107805,467736,448941,
|
s880621736
|
p00005
|
C
|
#include<stdio.h>
#include<conio.h>
int hcf(int n1, int n2);
int main()
{
long long a,b,l,x,y;
while (scanf("%lld %lld",&a,&b)==2)
{
x=a;
y=b;
while(a!=b)
{
if(a>b)
a=a-b;
else
b=b-a;
}
printf("%lld",b);
printf(" ");
l=(x*y)/b;
printf("%lld\n",l);
}
return 0;
}
int hcf(int x, int y)
{
if (y != 0)
return hcf(y, x%y);
else
return x;
}
|
main.c:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s290769723
|
p00005
|
C
|
#include <stdio.h>
int gcd(int a,int b){
if(b=0){
return a;
}
return gcd(b,a%b);
}
int main(){
int a,b;
scanf("%d%d",&a,&b) != EOF);
int g=gcd(a,b);
printf("%d %d\n",g,a/g*b);
return 0;
}
|
main.c: In function 'main':
main.c:12:29: error: expected ';' before ')' token
12 | scanf("%d%d",&a,&b) != EOF);
| ^
main.c:12:29: error: expected statement before ')' token
|
s099219428
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
b=a;
a=r;
r=a%b;}
printf("%d %d",gcd,c/gcd);
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
14 | r=a%b;
| ^
main.c:22:16: error: 'gcd' undeclared (first use in this function)
22 | printf("%d %d",gcd,c/gcd);
| ^~~
main.c:22:1: error: expected declaration or statement at end of input
22 | printf("%d %d",gcd,c/gcd);
| ^~~~~~
|
s216420388
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
b=a;
a=r;
r=a%b;}
printf("%d %d",r,c/r);
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
14 | r=a%b;
| ^
main.c:22:1: error: expected declaration or statement at end of input
22 | printf("%d %d",r,c/r);
| ^~~~~~
|
s738381235
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
b=a;
a=r;
r=a%b;}
printf("%d %d",tmp,c/tmp);
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
14 | r=a%b;
| ^
main.c:22:1: error: expected declaration or statement at end of input
22 | printf("%d %d",tmp,c/tmp);
| ^~~~~~
|
s152683631
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
a=b;
b=r;
r=a%b;}
printf("%d %d",b,c/b);
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
14 | r=a%b;
| ^
main.c:22:1: error: expected declaration or statement at end of input
22 | printf("%d %d",b,c/b);
| ^~~~~~
|
s962013212
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
a=b;
b=r;
r=a%b;}
printf("%d %d",b,c/b);
return 0;
}
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
14 | r=a%b;
| ^
|
s031406170
|
p00005
|
C
|
#include <stdio.h> int gcd(int a, int b) { if (a < b) { int tmp = a; a = b; b = tmp; } int r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } int main(void){ int a, b; while(scanf("%d %d\n", &a, &b) != EOF) { printf("%d %d\n", gcd(a, b), a / gcd(a, b) * b); } return 0; }
|
main.c:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> int gcd(int a, int b) { if (a < b) { int tmp = a; a = b; b = tmp; } int r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } int main(void){ int a, b; while(scanf("%d %d\n", &a, &b) != EOF) { printf("%d %d\n", gcd(a, b), a / gcd(a, b) * b); } return 0; }
| ^~~
/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
|
s607647784
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
using namespace std;
int gcd(int a, int b) {
int q,r;
while(r!=0){
q=b/a;
r=b%a;
b=a;
a=r;
}
return b;
}
int main(void){
int a, b;
while(cin >> a >> b) {
int lcm = a/gcd(a,b)*b;
cout << gcd(a,b) << " " << lcm << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s698888440
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
using namespace std;
int gcd(int a, int b) {
int p,q,r;
if(a>b){p=b;b=a;a=p;}
while(r!=0){
q=b/a;
r=b%a;
b=a;
a=r;
}
return b;
}
int main(void){
longint a, b;
while(cin >> a >> b) {
int lcm = a/gcd(a,b)*b;
cout << gcd(a,b) << " " << lcm << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s196499260
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
a=b;
b=r;
r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:15:1: error: 'r' undeclared (first use in this function)
15 | r=a%b;
| ^
|
s336614859
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
while(r!=0)
{
a=b;
b=r;
r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:15:7: error: 'r' undeclared (first use in this function)
15 | while(r!=0)
| ^
|
s902311906
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
a=b;
b=r;
r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:15:1: error: 'r' undeclared (first use in this function)
15 | r=a%b;
| ^
|
s003964082
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
using namespace std;
int gcd(int b, int a) {
int p,q,r;
if(a>b){p=b;b=a;a=p;}
while(r!=0){
q=b/a;
r=b%a;
b=a;
a=r;
}
return b;
}
int main(void){
int a, b;
while(cin >> a >> b) {
int lcm = a/gcd(a,b)*b;
cout << gcd(a,b) << " " << lcm << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s343665768
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
using namespace std;
int gcd(int a, int b) {
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
}
return b;
}
int main(void){
int a, b, tmp;
if (a < b){
tmp = b;
b = a;
a = tmp;
}
(cin >> a >> b);
int lcm = b * a / gcd(a,b);
cout << gcd(a,b) << " " << lcm << endl;
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s266711888
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);
c=a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r=a%b;
while(r!=0)
{
a=b;
b=r;
r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}
|
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
4 | int=a,b,c,r,tmp;
| ^
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
5 | scanf("%d %d",&a,&b);
| ^
main.c:7:1: error: 'c' undeclared (first use in this function)
7 | c=a*b;
| ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
10 | tmp = a;
| ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
14 | r=a%b;
| ^
|
s458708909
|
p00005
|
C
|
1071 1029
5 5
0 0
|
main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 1071 1029
| ^~~~
|
s288504313
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int m,n;
int lcm_num=lcm(m,n);
int gcd_num=gcd(m,n);
scanf("%d", &gcd_num);
scanf("%d", &lcm_num);
return 0;
}
int gcd(m,n){
while (m != n){
if(m >n)
m=m-n;
else
n=n-m;
}
return m;
}
int lcm(m,n)
{
return (m*n/gcd(m,n) )
}
|
main.c: In function 'main':
main.c:5:17: error: implicit declaration of function 'lcm' [-Wimplicit-function-declaration]
5 | int lcm_num=lcm(m,n);
| ^~~
main.c:6:16: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
6 | int gcd_num=gcd(m,n);
| ^~~
main.c: In function 'gcd':
main.c:12:9: error: type of 'm' defaults to 'int' [-Wimplicit-int]
12 | int gcd(m,n){
| ^~~
main.c:12:9: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c: In function 'lcm':
main.c:22:9: error: type of 'm' defaults to 'int' [-Wimplicit-int]
22 | int lcm(m,n)
| ^~~
main.c:22:9: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:24:28: error: expected ';' before '}' token
24 | return (m*n/gcd(m,n) )
| ^
| ;
25 | }
| ~
|
s767703461
|
p00005
|
C
|
#include <stdio.h> long gcd_euclid(long m, long n) { long temp; while (n) { temp = m % n; m = n; n = temp; } return m; } int main(){ long a, b; long temp; long gcd, lcm; while(scanf("%ld %ld", &a, &b)!=EOF){ gcd = gcd_euclid(a, b); temp = a / gcd; lcm = temp * b; printf("%ld %ld\n", gcd, lcm); } return 0; }
|
main.c:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> long gcd_euclid(long m, long n) { long temp; while (n) { temp = m % n; m = n; n = temp; } return m; } int main(){ long a, b; long temp; long gcd, lcm; while(scanf("%ld %ld", &a, &b)!=EOF){ gcd = gcd_euclid(a, b); temp = a / gcd; lcm = temp * b; printf("%ld %ld\n", gcd, lcm); } return 0; }
| ^~~~
/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
|
s245906524
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
using namespace std;
long gcd(long a, long b){
long p,q,r;
r=0;
if(a<b){
p=b;
b=a;
a=p;
}
while(r){
q=b/a;
r=b%a;
b=a;
a=r;
}
return b;
}
int main(void){
int a, b;
while(cin >> a >> b) {
int lcm = a/gcd(a,b)*b;
cout << gcd(a,b) << " " << lcm << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s752244976
|
p00005
|
C
|
#include <iostream>
#include <cstdio>
using namespace std;
int gcd(int a, int b){
int p,q,r;
if(a<b){p=b;b=a;a=p;
}
while(r!=0){
q=b/a;
r=b%a;
b=a;
a=r;
}
return b;
}
int main(void)
{ int a, b;
while(cin >> a >> b) {
int lcm = a*b/gcd(a,b);
cout << gcd(a,b) << " " << lcm << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s127682790
|
p00005
|
C
|
#include<stdio.h> int main(void){ int a,b,r,ans,a1,b1; double c; while(scanf("%d %d",&a,&b)!=EOF){ a1=a,b1=b; while(1){ r=a%b; if(r==0){ ans=b; break; }else{ a=b; b=r; } } c=(double)(a1)*(double)(b1)/(double)(ans); printf("%d %.0f\n",ans,c); } return 0; }
|
main.c:1:19: warning: extra tokens at end of #include directive
1 | #include<stdio.h> int main(void){ int a,b,r,ans,a1,b1; double c; while(scanf("%d %d",&a,&b)!=EOF){ a1=a,b1=b; while(1){ r=a%b; if(r==0){ ans=b; break; }else{ a=b; b=r; } } c=(double)(a1)*(double)(b1)/(double)(ans); printf("%d %.0f\n",ans,c); } return 0; }
| ^~~
/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
|
s969043877
|
p00005
|
C
|
#include<stdio.h> int main(void){ int a,b,r,ans,a1,b1; double c; while(scanf("%d %d",&a,&b)!=EOF){ a1=a,b1=b; while(1){ r=a%b; if(r==0){ ans=b; break; }else{ a=b; b=r; } } c=(double)(a1)*(double)(b1)/(double)(ans); printf("%d %.0f\n",ans,c); } return 0; }
|
main.c:1:19: warning: extra tokens at end of #include directive
1 | #include<stdio.h> int main(void){ int a,b,r,ans,a1,b1; double c; while(scanf("%d %d",&a,&b)!=EOF){ a1=a,b1=b; while(1){ r=a%b; if(r==0){ ans=b; break; }else{ a=b; b=r; } } c=(double)(a1)*(double)(b1)/(double)(ans); printf("%d %.0f\n",ans,c); } return 0; }
| ^~~
/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
|
s324908735
|
p00005
|
C
|
#include<stdio.h> int main(void){ int m,n,g,l,work,a,b; while(scanf("%d%d",&m,&n)!=EOF){ a=m; b=n; if(m<n){ work=m; m=n; n=work; } while(n!=0){ work=m%n; m=n; n=work; } g=m; l=a/g; l*=b; printf("%d %d\n",g,l); } return 0; }
|
main.c:1:19: warning: extra tokens at end of #include directive
1 | #include<stdio.h> int main(void){ int m,n,g,l,work,a,b; while(scanf("%d%d",&m,&n)!=EOF){ a=m; b=n; if(m<n){ work=m; m=n; n=work; } while(n!=0){ work=m%n; m=n; n=work; } g=m; l=a/g; l*=b; printf("%d %d\n",g,l); } return 0; }
| ^~~
/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
|
s399314876
|
p00005
|
C
|
#include<stdio.h> int main() { long long int a,b,i,x,y,t; while(scanf("%lld%lld",&a,&b)==2){ x=a;y=b; while(b){ t=a%b; a=b; b=t; } printf("%lld %lld\n",a,(x*y)/a); } return 0; }
|
main.c:1:19: warning: extra tokens at end of #include directive
1 | #include<stdio.h> int main() { long long int a,b,i,x,y,t; while(scanf("%lld%lld",&a,&b)==2){ x=a;y=b; while(b){ t=a%b; a=b; b=t; } printf("%lld %lld\n",a,(x*y)/a); } return 0; }
| ^~~
/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
|
s657983054
|
p00005
|
C
|
#include <stdio.h>
int euclid(int a,int b) {
if(b==0)return a;
else return euclid(b,a%b);
}
int main(void) {
int a,b;
int gcd;
while(!feof(stdin)) {
scanf("%d %d",&a,&b);
if(eof(stdin))break;
gcd=euclid(a,b);
printf("%d %d\n",gcd,a/gcd*b);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:20: error: implicit declaration of function 'eof'; did you mean 'feof'? [-Wimplicit-function-declaration]
13 | if(eof(stdin))break;
| ^~~
| feof
|
s540350369
|
p00005
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, a2, b2;
int max, min, r;
while (scanf("%d %d", &a, &b) != EOF){
a2 = a;
b2 = b;
r = 1;
while (r != 0){
r = a % d;
a2 = b2;
b2 = r;
}
max = b2;
min = (a * b) / max;
printf("%d %d\n", max, min);
}
return (0);
}
|
main.c: In function 'main':
main.c:13:33: error: 'd' undeclared (first use in this function)
13 | r = a % d;
| ^
main.c:13:33: note: each undeclared identifier is reported only once for each function it appears in
|
s473259089
|
p00005
|
C
|
#include <stdio.h>
int GCD(int a, int b);
int main(void)
{
int a, b;
int max, min, r;
while (scanf("%d %d", &a, &b) != EOF){
max = GCD(a, b);
min = (a * b) / max;
printf("%d %d\n", max. min);
}
return (0);
}
int GCD(int a, int b){ // a=ªêAb=ªq@Ü ÇÁ¿Åࢢ
@int r; // ]è
@r = a % b; // abÌ]èªr
@if(r==0){
@@return b;
@}else{
@@return GCD(b, r);
@}
}
|
main.c: In function 'main':
main.c:13:38: error: request for member 'min' in something not a structure or union
13 | printf("%d %d\n", max. min);
| ^
main.c: In function 'GCD':
main.c:20:1: error: stray '\302' in program
20 | <U+0081>@int r; // <U+0097>]<U+0082><U+00E8>
| ^~~~~~~~
main.c:20:2: error: stray '@' in program
20 | @int r; // ]è
| ^
main.c:21:1: error: stray '\302' in program
21 | <U+0081>@r = a % b; // a<U+0081><U+0080>b<U+0082><U+00CC><U+0097>]<U+0082><U+00E8><U+0082><U+00AA>r
| ^~~~~~~~
main.c:21:2: error: stray '@' in program
21 | @r = a % b; // abÌ]èªr
| ^
main.c:22:1: error: stray '\302' in program
22 | <U+0081>@if(r==0){
| ^~~~~~~~
main.c:22:2: error: stray '@' in program
22 | @if(r==0){
| ^
main.c:23:1: error: stray '\302' in program
23 | <U+0081>@<U+0081>@return b;
| ^~~~~~~~
main.c:23:2: error: stray '@' in program
23 | @@return b;
| ^
main.c:23:3: error: stray '\302' in program
23 | <U+0081>@<U+0081>@return b;
| ^~~~~~~~
main.c:23:4: error: stray '@' in program
23 | @@return b;
| ^
main.c:24:1: error: stray '\302' in program
24 | <U+0081>@}else{
| ^~~~~~~~
main.c:24:2: error: stray '@' in program
24 | @}else{
| ^
main.c:25:1: error: stray '\302' in program
25 | <U+0081>@<U+0081>@return GCD(b, r);
| ^~~~~~~~
main.c:25:2: error: stray '@' in program
25 | @@return GCD(b, r);
| ^
main.c:25:3: error: stray '\302' in program
25 | <U+0081>@<U+0081>@return GCD(b, r);
| ^~~~~~~~
main.c:25:4: error: stray '@' in program
25 | @@return GCD(b, r);
| ^
main.c:26:1: error: stray '\302' in program
26 | <U+0081>@}
| ^~~~~~~~
main.c:26:2: error: stray '@' in program
26 | @}
| ^
|
s366780142
|
p00005
|
C
|
#include <stdio.h>
__int64 gcd(void);
__int64 lcm(void);
int main(void){
__int64 a , b;
while(scanf("%lld %lld" , &a , &b)!=EOF){
printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
}
return 0;
}
__int64 gcd( __int64 a , __int64 b ){
__int64 r;
while((r = a % b)!=0){
a = b;
b = r;
}
return b;
}
__int64 lcm( __int64 a , __int64 b){
return a/gcd(a,b)*b;
}
|
main.c:3:1: error: unknown type name '__int64'; did you mean '__int64_t'?
3 | __int64 gcd(void);
| ^~~~~~~
| __int64_t
main.c:4:1: error: unknown type name '__int64'; did you mean '__int64_t'?
4 | __int64 lcm(void);
| ^~~~~~~
| __int64_t
main.c: In function 'main':
main.c:7:9: error: unknown type name '__int64'; did you mean '__int64_t'?
7 | __int64 a , b;
| ^~~~~~~
| __int64_t
main.c:9:40: error: too many arguments to function 'gcd'
9 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c:3:9: note: declared here
3 | __int64 gcd(void);
| ^~~
main.c:9:51: error: too many arguments to function 'lcm'
9 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c:4:9: note: declared here
4 | __int64 lcm(void);
| ^~~
main.c: At top level:
main.c:14:1: error: unknown type name '__int64'; did you mean '__int64_t'?
14 | __int64 gcd( __int64 a , __int64 b ){
| ^~~~~~~
| __int64_t
main.c:14:14: error: unknown type name '__int64'; did you mean '__int64_t'?
14 | __int64 gcd( __int64 a , __int64 b ){
| ^~~~~~~
| __int64_t
main.c:14:26: error: unknown type name '__int64'; did you mean '__int64_t'?
14 | __int64 gcd( __int64 a , __int64 b ){
| ^~~~~~~
| __int64_t
main.c:23:1: error: unknown type name '__int64'; did you mean '__int64_t'?
23 | __int64 lcm( __int64 a , __int64 b){
| ^~~~~~~
| __int64_t
main.c:23:14: error: unknown type name '__int64'; did you mean '__int64_t'?
23 | __int64 lcm( __int64 a , __int64 b){
| ^~~~~~~
| __int64_t
main.c:23:26: error: unknown type name '__int64'; did you mean '__int64_t'?
23 | __int64 lcm( __int64 a , __int64 b){
| ^~~~~~~
| __int64_t
|
s129963830
|
p00005
|
C
|
#include <stdio.h>
long long int gcd(void);
long long int lcm(void);
int main(void){
long long int a , b;
while(scanf("%lld %lld" , &a , &b)!=EOF){
printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
}
return 0;
}
long long int gcd( long long int a , long long int b ){
long long int r;
while((r = a % b)!=0){
a = b;
b = r;
}
return b;
}
long long int lcm( long long int a , long long int b){
return a/gcd(a,b)*b;
}
|
main.c: In function 'main':
main.c:9:40: error: too many arguments to function 'gcd'
9 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c:3:15: note: declared here
3 | long long int gcd(void);
| ^~~
main.c:9:51: error: too many arguments to function 'lcm'
9 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c:4:15: note: declared here
4 | long long int lcm(void);
| ^~~
main.c: At top level:
main.c:14:15: error: conflicting types for 'gcd'; have 'long long int(long long int, long long int)'
14 | long long int gcd( long long int a , long long int b ){
| ^~~
main.c:3:15: note: previous declaration of 'gcd' with type 'long long int(void)'
3 | long long int gcd(void);
| ^~~
main.c:23:15: error: conflicting types for 'lcm'; have 'long long int(long long int, long long int)'
23 | long long int lcm( long long int a , long long int b){
| ^~~
main.c:4:15: note: previous declaration of 'lcm' with type 'long long int(void)'
4 | long long int lcm(void);
| ^~~
|
s771507142
|
p00005
|
C
|
#include <stdio.h>
int main(void){
long long int a , b;
while(scanf("%lld %lld" , &a , &b)!=EOF){
printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
}
return 0;
}
long long int gcd( long long int a , long long int b ){
long long int r;
while((r = a % b)!=0){
a = b;
b = r;
}
return b;
}
long long int lcm( long long int a , long long int b){
return a/gcd(a,b)*b;
}
|
main.c: In function 'main':
main.c:6:40: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
6 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c:6:51: error: implicit declaration of function 'lcm' [-Wimplicit-function-declaration]
6 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c: At top level:
main.c:11:15: error: conflicting types for 'gcd'; have 'long long int(long long int, long long int)'
11 | long long int gcd( long long int a , long long int b ){
| ^~~
main.c:6:40: note: previous implicit declaration of 'gcd' with type 'int()'
6 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
main.c:20:15: error: conflicting types for 'lcm'; have 'long long int(long long int, long long int)'
20 | long long int lcm( long long int a , long long int b){
| ^~~
main.c:6:51: note: previous implicit declaration of 'lcm' with type 'int()'
6 | printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
| ^~~
|
s381459380
|
p00005
|
C
|
#include <cstdio>
#include<stdio.h>
int main(){
long unsigned int a, b, gcd, lcm;
while(scanf("%llu %llu\n", &a, &b)+1){
long unsigned int m, n, o;
m = a;
n = b;
while(1){
if(!(o = m % n)){
gcd = n;
break;
}
m = n;
n = o;
}
lcm = a * b / gcd;
printf("%llu %llu\n", gcd, lcm);
}
return 0;
}
|
main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s910262337
|
p00005
|
C
|
#include<cstdio.h>
#include<stdio.h>
int main(){
long unsigned int a, b, gcd, lcm;
while(scanf("%llu %llu\n", &a, &b)+1){
long unsigned int m, n, o;
m = a;
n = b;
while(1){
if(!(o = m % n)){
gcd = n;
break;
}
m = n;
n = o;
}
lcm = a * b / gcd;
printf("%llu %llu\n", gcd, lcm);
}
return 0;
}
|
main.c:1:9: fatal error: cstdio.h: No such file or directory
1 | #include<cstdio.h>
| ^~~~~~~~~~
compilation terminated.
|
s121842574
|
p00005
|
C
|
#include<cstdio.h>
#include<stdio.h>
int main(){
long unsigned int a, b, gcd, lcm;
while(scanf("%llu %llu", &a, &b)+1){
long unsigned int m, n, o;
m = a;
n = b;
while(1){
if(!(o = m % n)){
gcd = n;
break;
}
m = n;
n = o;
}
lcm = a * b / gcd;
printf("%llu %llu\n", gcd, lcm);
}
return 0;
}
|
main.c:1:9: fatal error: cstdio.h: No such file or directory
1 | #include<cstdio.h>
| ^~~~~~~~~~
compilation terminated.
|
s678486372
|
p00005
|
C
|
#include<cstdio>
#include<stdio.h>
int main(){
long unsigned int a, b, gcd, lcm;
while(scanf("%llu %llu", &a, &b)+1){
long unsigned int m, n, o;
m = a;
n = b;
while(1){
if(!(o = m % n)){
gcd = n;
break;
}
m = n;
n = o;
}
lcm = a * b / gcd;
printf("%llu %llu\n", gcd, lcm);
}
return 0;
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s590652859
|
p00005
|
C
|
c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
|
main.c:1:1: warning: data definition has no type or storage class
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^
main.c: In function 'g':
main.c:1:3: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:3: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c: At top level:
main.c:1:26: error: return type defaults to 'int' [-Wimplicit-int]
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^~~~
main.c: In function 'main':
main.c:1:26: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:26: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:42: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
main.c:1:42: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^~~~~
main.c:1:42: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:62: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^~~~~~
main.c:1:62: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:62: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:62: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:79: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
| ^~~
|
s614262219
|
p00005
|
C
|
#include <stdio.h>
#include <conio.h>
int main(void)
{
int a, b;
int i;
int Max;
int Min = 0;
while (scanf("%d %d", &a, &b) != EOF){
for (i = 2; 1; i++){
if (i < a){
if (a % i == 0 && b % i == 0){
Max = i;
}
}else {
if (i % a == 0 && i % b == 0){
Min = i;
}
}
if (Min != 0) break;
}
printf("%d %d\n", Max, Min);
Max = 0;
Min = 0;
}
return (0);
}
|
main.c:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s397882889
|
p00005
|
C
|
#include<stdio.h>
int main()
{
__int64 a,b,m,n,x,gcd,lcm;
while(scanf("%I64u %I64u",&a,&b)==2)
{
m=a;
n=b;
while(1){
if(!(x=m%n)){
gcd=n;
break;
}
m=n;
n=x;
}
lcm=a*b/gcd;
printf("%I64u %I64u\n",gcd,lcm);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | __int64 a,b,m,n,x,gcd,lcm;
| ^~~~~~~
| __int64_t
|
s422577379
|
p00005
|
C
|
#include<stdio.h>
int main(void){
__int64 a,b;
__int64 data;
__int64 max,min,high,low; //max=Ååöñ,min=Ŭö{
while(scanf("%I64u %I64u",&a,&b)==2){
printf("\n%I64u %I64u\n",a,b);
if(a<b){
data=a;
a=b;
b=data;
}
if(b==0) max=a;
else{
data=a%b;
low=b;
while(data!=0){
high=low;
low=data;
data=high%low;
}
max=low;
}
min=a*b/max;
printf("%I64u %I64u\n",max,min);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:9: error: unknown type name '__int64'; did you mean '__int64_t'?
4 | __int64 a,b;
| ^~~~~~~
| __int64_t
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | __int64 data;
| ^~~~~~~
| __int64_t
main.c:6:9: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 max,min,high,low; //max=Ååöñ,min=Ŭö{
| ^~~~~~~
| __int64_t
|
s107011250
|
p00005
|
C
|
#include<stdio.h>
int main(void){
longlong a,b;
longlong data;
longlong max,min,high,low; max=Ååöñ,min=Ŭö{
while(scanf("%lld %lld",&a,&b)==2){
if(a<b){
data=a;
a=b;
b=data;
}
if(b==0) max=a;
else{
data=a%b;
low=b;
while(data!=0){
high=low;
low=data;
data=high%low;
}
max=low;
}
min=a*b/max;
printf("%lld %lld\n",max,min);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:9: error: unknown type name 'longlong'
4 | longlong a,b;
| ^~~~~~~~
main.c:5:9: error: unknown type name 'longlong'
5 | longlong data;
| ^~~~~~~~
main.c:6:9: error: unknown type name 'longlong'
6 | longlong max,min,high,low; max=Ååöñ,min=Ŭö{
| ^~~~~~~~
main.c:6:45: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:47: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:46: error: '\U000000c5' undeclared (first use in this function)
6 | longlong max,min,high,low; max=Ååöñ,min=Ŭö{
| ^
main.c:6:46: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:47: error: expected ';' before '\U000000e5'
6 | longlong max,min,high,low; max=Ååöñ,min=Ŭö{
| ^~
| ;
main.c:6:49: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:51: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:53: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:54: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:60: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:62: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:63: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:64: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:66: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:68: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:6:69: error: stray '\302' in program
6 | longlong max,min,high,low; max=<U+008D><U+00C5><U+0091><U+00E5><U+008C><U+00F6><U+0096><U+00F1><U+0090><U+0094>,min=<U+008D><U+00C5><U+008F><U+00AC><U+008C><U+00F6><U+0094>{<U+0090><U+0094>
| ^~~~~~~~
main.c:31:1: error: expected declaration or statement at end of input
31 | }
| ^
|
s692849761
|
p00005
|
C
|
#include<cstdio>
using namespace std;
int gcd(int a,int b){
if(!b) return a;
else return gcd(b,a%b);
}
int main(void){
int a,b;
int g;
for(;scanf("%d%d",&a,&b)==2;){
g=gcd(a,b);
printf("%d %d\n",g,a/g*b);
}
return 0;
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s137732869
|
p00005
|
C
|
#include<stdio.h>
int a,b,c,i,j,lcm,x,y,n,m,z;
long o[2000000000],p[2000000000];
int main(void){
while(scanf("%d%d",&a,&b) != EOF){
if(a>=b){
c=a;
a=b;
b=c;
}
for(x=a;x>=1;x=x-1){
if(a%x==0){
m=a/x;
o[m]=a/x;
/*printf("%d\n",o[m]);*/
}
}
for(y=b;y>=1;y--){
if(b%y==0){
n=b/y;
p[n]=b/y;
/* printf("%d\n",p[n]);*/
for(i=0;i<=b;i++){
if(o[i]==p[n]){
z=n;
/*printf("--%d\n",p[z]);*/
}
}
}
}
j=a*b/p[z];
/*printf("G.C.D=%d\n",p[z]);
printf("L.C.M=%d\n",j);*/
printf("%d %d\n",p[z],j);
}
return 0;
}
|
/tmp/cc2AWae3.o: in function `main':
main.c:(.text+0x123): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cc2AWae3.o
main.c:(.text+0x165): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cc2AWae3.o
main.c:(.text+0x1df): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cc2AWae3.o
main.c:(.text+0x20b): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cc2AWae3.o
collect2: error: ld returned 1 exit status
|
s407213857
|
p00005
|
C
|
#include<stdio.h>
int a,b,c,i,j,lcm,x,y,n,m,z;
int o[2000000000],p[2000000000];
int main(void){
while(scanf("%d%d",&a,&b) != EOF){
if(a>=b){
c=a;
a=b;
b=c;
}
for(x=a;x>=1;x=x-1){
if(a%x==0){
m=a/x;
o[m]=a/x;
/*printf("%d\n",o[m]);*/
}
}
for(y=b;y>=1;y--){
if(b%y==0){
n=b/y;
p[n]=b/y;
/* printf("%d\n",p[n]);*/
for(i=0;i<=b;i++){
if(o[i]==p[n]){
z=n;
/*printf("--%d\n",p[z]);*/
}
}
}
}
j=a*b/p[z];
/*printf("G.C.D=%d\n",p[z]);
printf("L.C.M=%d\n",j);*/
printf("%d %d\n",p[z],j);
}
return 0;
}
|
/tmp/cciG6v8r.o: in function `main':
main.c:(.text+0x122): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cciG6v8r.o
main.c:(.text+0x162): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cciG6v8r.o
main.c:(.text+0x1d8): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cciG6v8r.o
main.c:(.text+0x201): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/cciG6v8r.o
collect2: error: ld returned 1 exit status
|
s471207059
|
p00005
|
C
|
#include <stdio.h>
int gcd(long long int a, long long int b);
int max(long long int a, long long int b);
int main()
{
int a, b;
while (scanf("%d %d", &a, &b) != EOF) printf("%d %d\n", gcd(a, b), a * (b / gcd(a, b)));
return 0;
}
int gcd(long long int a, long long int b)
{
while(a * b) {
if(a < b) b %= a;
else a %= b;
}
return max(a, b);
}
int max(int a, int b)
{
if(a >= b) return a;
else return b;
}
|
main.c:22:5: error: conflicting types for 'max'; have 'int(int, int)'
22 | int max(int a, int b)
| ^~~
main.c:4:5: note: previous declaration of 'max' with type 'int(long long int, long long int)'
4 | int max(long long int a, long long int b);
| ^~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.