submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s368330431 | p02256 | Java | import java.io.*;
class Main {
public static void main (String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] input = br.readLine().split(" ");
int a = Integer.parseInt(input[0]);
int b = Integer.parseInt(input[1]);
... | Main.java:19: error: cannot find symbol
if (x % y == 0) return y;
^
symbol: variable x
location: class Main
Main.java:19: error: cannot find symbol
if (x % y == 0) return y;
^
symbol: variable y
location: class Main
Main.java:19: error: cannot find symbol
... |
s546405662 | p02256 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int x = scan.nextInt();
int y = scan.nextInt();
System.out.printf("%d\n", gcd(x, y));
}
public static int gcd(int x, int y){
if(x < y){
int work = y;
y = x;
... | Main.java:20: error: cannot find symbol
r = x % y;
^
symbol: variable r
location: class Main
Main.java:22: error: cannot find symbol
y = r;
^
symbol: variable r
location: class Main
2 errors
|
s330814343 | p02256 | Java | import java.io.*;
class Main{
public static void main(String[] args)[
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String[] S = br.readLine().spilt(" ", 0);
int x = Integer.parseInt(S[0]);
int y = Integer.parseInt(S[1]... | Main.java:4: error: ';' expected
public static void main(String[] args)[
^
Main.java:11: error: ';' expected
int i
^
Main.java:13: error: <identifier> expected
if(x<=y){
^
Main.java:13: error: <identifier> expected
if(x<=y){
... |
s576774123 | p02256 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException[
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String[] S = br.readLine().spilt(" ", 0);
int x = Integer.parseInt(S[0]);
int y = ... | Main.java:4: error: ';' expected
public static void main(String[] args) throws IOException[
^
Main.java:11: error: ';' expected
int i
^
Main.java:13: error: <identifier> expected
if(x<=y){
^
Main.java:13: error: <i... |
s733774098 | p02256 | Java | import java.io.*;
class Main{
public static void main(String[] args){
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String[] S = br.readLine().spilt(" ", 0);
int x = Integer.parseInt(S[0]);
int y = Integer.parseInt(S[... | Main.java:8: error: cannot find symbol
String[] S = br.readLine().spilt(" ", 0);
^
symbol: method spilt(String,int)
location: class String
1 error
|
s327106431 | p02256 | Java | import java.io.*;
class Main{
public static void main(String[] args){
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String[] S = br.readLine().spilt(" ");
int x = Integer.parseInt(S[0]);
int y = Integer.parseInt(S[1... | Main.java:8: error: cannot find symbol
String[] S = br.readLine().spilt(" ");
^
symbol: method spilt(String)
location: class String
1 error
|
s312176487 | p02256 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String[] S = br.readLine().spilt(" ");
int x = Integer.parseInt(S[0]);
int y =... | Main.java:8: error: cannot find symbol
String[] S = br.readLine().spilt(" ");
^
symbol: method spilt(String)
location: class String
1 error
|
s546392913 | p02256 | Java | import java.util.Scanner;
public class ALDS_B {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
//2???????????¶??°???????????????
int numX = sc.nextInt();
int numY = sc.nextInt();
//0??????????????§??????????±???????
int output = 0;
int chec... | Main.java:3: error: class ALDS_B is public, should be declared in a file named ALDS_B.java
public class ALDS_B {
^
1 error
|
s572760580 | p02256 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
//2???????????¶??°???????????????
int numX = sc.nextInt();
int numY = sc.nextInt();
//0??????????????§??????????±???????
int output = 0;
int checkNum = 0;
do {
output ... | Main.java:5: error: cannot find symbol
Scanner sc = null;
^
symbol: class Scanner
location: class Main
Main.java:8: error: cannot find symbol
sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s859653045 | p02256 | Java | import java.util.Scanner;
public class ALDS_B {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
//2???????????¶??°???????????????
int numX = sc.nextInt();
int numY = sc.nextInt();
//0??????????????§??????????±???????
int output = 0;
int chec... | Main.java:3: error: class ALDS_B is public, should be declared in a file named ALDS_B.java
public class ALDS_B {
^
1 error
|
s756566428 | p02256 | Java | import java.util.Scanner;
public class ALDS_B {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
//2???????????¶??°???????????????
int numX = sc.nextInt();
int numY = sc.nextInt();
//0??????????????§??????????±???????
int output = 0;
int chec... | Main.java:3: error: class ALDS_B is public, should be declared in a file named ALDS_B.java
public class ALDS_B {
^
1 error
|
s595626271 | p02256 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner();
int i = sc.nexInt();
int j = sc.nextInt();
System.out.println(getGDC(i, j));
}
private static int getGDC(int i, int j) {
if (j == 0) return i;
return ge... | Main.java:5: error: no suitable constructor found for Scanner(no arguments)
Scanner sc = new Scanner();
^
constructor Scanner.Scanner(Readable,Pattern) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Readable) i... |
s899420582 | p02256 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner();
int i = sc.nexInt();
int j = sc.nextInt();
System.out.println(getGDC(i, j));
}
private static int getGDC(int i, int j) {
if (j == 0) retur... | Main.java:5: error: no suitable constructor found for Scanner(no arguments)
Scanner sc = new Scanner();
^
constructor Scanner.Scanner(Readable,Pattern) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Readable) i... |
s580373228 | p02256 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i = sc.nexInt();
int j = sc.nextInt();
System.out.println(getGDC(i, j));
}
private static int getGDC(int i, int j) {
if (j ==... | Main.java:6: error: cannot find symbol
int i = sc.nexInt();
^
symbol: method nexInt()
location: variable sc of type Scanner
1 error
|
s826121989 | p02256 | Java | import java.util.*;
public class Main {
static Scanner sc = new Scanner (System.in);
public static void main (String[] args) {
GCF calc = new GCF();
long a = sc.nextLong();
long b = sc.nextLong();
System.out.println(calc.GCF(a, b));
}
public long GCF(long a, long b) {
if (b == 0) return a;
else ... | Main.java:5: error: cannot find symbol
GCF calc = new GCF();
^
symbol: class GCF
location: class Main
Main.java:5: error: cannot find symbol
GCF calc = new GCF();
^
symbol: class GCF
location: class Main
2 errors
|
s807647109 | p02256 | Java | import java.util.*;
public class Main {
static Scanner sc = new Scanner (System.in);
public static void main (String[] args) {
Main calc = new Main();
long a = sc.nextLong();
long b = sc.nextLong();
System.out.println(calc.Main(a, b));
}
public long GCF(long a, long b) {
if (b == 0) return a;
el... | Main.java:8: error: cannot find symbol
System.out.println(calc.Main(a, b));
^
symbol: method Main(long,long)
location: variable calc of type Main
1 error
|
s548687965 | p02256 | Java | import java.util.*;
public class Main {
static Scanner sc = new Scanner (System.in);
public static void main (String[] args) {
GCF calc = new GCF();
long a = sc.nextLong();
long b = sc.nextLong();
System.out.println(calc.GCF(a, b));
}
public long GCF(long a, long b) {
if (b == 0) return a;
else ... | Main.java:5: error: cannot find symbol
GCF calc = new GCF();
^
symbol: class GCF
location: class Main
Main.java:5: error: cannot find symbol
GCF calc = new GCF();
^
symbol: class GCF
location: class Main
2 errors
|
s322192500 | p02256 | Java |
import java.util.*;
public class Main {
static Scanner sc = new Scanner (System.in);
public static void main (String[] args) {
Main calc = new GCF();
long a = sc.nextLong();
long b = sc.nextLong();
System.out.println(calc.GCF(a, b));
}
public long GCF(long a, long b) {
if (b == 0) return a;
els... | Main.java:6: error: cannot find symbol
Main calc = new GCF();
^
symbol: class GCF
location: class Main
1 error
|
s008009411 | p02256 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws Exception{
BufferedReader br =
new BufferedReader(new InputStreamReader(System.in));
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int ... | Main.java:24: error: cannot find symbol
temp = b;
^
symbol: variable temp
location: class Main
Main.java:26: error: cannot find symbol
a = temp;
^
symbol: variable temp
location: class Main
2 errors
|
s967312453 | p02256 | Java | import java.util.ArrayList;
import java.util.List;
class Main {
public static void main(String[] args) {
Input stdIn = new Input();
List<Integer> inputline = stdIn.getLine();
int x = inputline.get(0);
int y = inputline.get(1);
List<Integer> xDivisor = new ArrayList<>();
List<Integer> yDivisor = new Arr... | Main.java:39: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Input
Main.java:39: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
s... |
s530746287 | p02256 | Java | import java.util.ArrayList;
import java.util.List;
class Main {
public static void main(String[] args) {
Input stdIn = new Input();
List<Integer> inputline = stdIn.getLine();
int x = inputline.get(0);
int y = inputline.get(1);
List<Integer> xDivisor = new ArrayList<>();
List<Integer> yDivisor = new Arr... | Main.java:38: error: class, interface, enum, or record expected
import java.io.BufferedReader;
^
1 error
|
s694922254 | p02256 | Java | import java.util.ArrayList;
import java.util.List;
import java.io.BufferedReader;
class Main {
public static void main(String[] args) {
Input stdIn = new Input();
List<Integer> inputline = stdIn.getLine();
int x = inputline.get(0);
int y = inputline.get(1);
List<Integer> xDivisor = new ArrayList<>();
L... | Main.java:40: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Input
Main.java:49: error: cannot find symbol
} catch (IOException e) {
^
symbol: class ... |
s951398303 | p02256 | Java | import java.util.List;
class Main {
public static void main(String[] args) {
Input stdIn = new Input();
List<Integer> inputline = stdIn.getLine();
int x = inputline.get(0);
int y = inputline.get(1);
int q,r;
while(true) {
q = x / y;
r = x % y;
if (r == 0) {
System.out.println(y);
break... | Main.java:27: error: class, interface, enum, or record expected
import java.io.BufferedReader;
^
Main.java:28: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:29: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:30: error: class, i... |
s478312401 | p02256 | Java | import java.util.Scanner;
public class Ex1 {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int a = x.nextInt(), b = x.nextInt();
}
static int gcd(int a, int b){
while (b != 0){
int remainder = a % b;
a = b;
b = remai... | Main.java:2: error: class Ex1 is public, should be declared in a file named Ex1.java
public class Ex1 {
^
1 error
|
s792982348 | p02256 | Java | import java.util.Scanner;
public class ALDS1_1_B {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int a = x.nextInt(), b = x.nextInt();
}
static int gcd(int a, int b){
while (b != 0){
int remainder = a % b;
a = b;
b =... | Main.java:2: error: class ALDS1_1_B is public, should be declared in a file named ALDS1_1_B.java
public class ALDS1_1_B {
^
1 error
|
s505720226 | p02256 | Java | public class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
long x=scan.nextInt();
long y=scan.nextInt();
long GCD=x;
while(x%y!=0){
if(x>=y){
x=x%y;
GCD=x;
}
else{
... | Main.java:4: error: cannot find symbol
Scanner scan=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner scan=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s989379272 | p02256 | Java | import java.util.Scanner;
public class main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
while(true){
int result = a % b;
if(result == 0){
System.out.println(b);
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s309188682 | p02256 | Java | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
str = br.readLine();
String[] line = str.split("\\s");
... | Main.java:31: error: cannot find symbol
if(m == 0){
^
symbol: variable m
location: class Main
1 error
|
s475686390 | p02256 | Java | import java.util.*;
import java.lang.*;
public class main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
while (n1 != 0 && n2 != 0) {
int temp = n2;
n2 = n1;
n1 = temp % n1;
}
System.out.println((n1==0)? n2... | Main.java:4: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s288635566 | p02256 | Java | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
long numbef = scanner.nextInt();//要素数
long numaft = scanner.nextInt();//要素数
//insertionSort(numbef, numaft);
gcd_euclid(numbef, numaft);
scanner.close();
}
public static v... | Main.java:24: error: cannot find symbol
System.out.println(u);
^
symbol: variable u
location: class Main
1 error
|
s325804012 | p02256 | Java | import java.util.Scanner;
public class Gcd{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
int x=s.nextInt();
int y=s.nextInt();
int z=1;
while(z!=0){
z=x%y;
x=y;
y=z;
}
System.out.println(x);
}
}
| Main.java:2: error: class Gcd is public, should be declared in a file named Gcd.java
public class Gcd{
^
1 error
|
s843546956 | p02256 | Java | #include<stdio.h>
int minint(int a,int b);
int main(void){
int x=0,y=0,min,i=1;
int alfa=0;
scanf("%d %d",&x,&y);
min=minint(x,y);
while(i<=min){
if(x%i==0&&y%i==0){
alfa=i;
}
i++;
}
printf("%d \n",alfa);
}
int minint(int a,int b){
int minint;
if(a<b){
minint=a;
}
if(b<a){
minint=b;
}
... | Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main(void){
^
(use --enable-preview to enable unnamed classes)
Main.java:... |
s636721827 | p02256 | Java | /**
*
*/
package com.aizu;
import java.util.Scanner;
/**
* @author Rancho
*
*/
public class GCD {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String numStr = sc.nextLine();
String[] numArr = numStr.split(" ");
int[] arr = new int[numArr.leng... | Main.java:12: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s067038717 | p02256 | Java | /**
*
*/
package com.aizu;
import java.util.Scanner;
/**
* @author Rancho
*
*/
public class GCD {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String numStr = sc.nextLine();
String[] numArr = numStr.split(" ");
int[] arr = new int[numArr.leng... | Main.java:12: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s076521742 | p02256 | Java | /**
*
*/
package com.aizu;
import java.util.Scanner;
/**
* @author Rancho
*
*/
public class GCD {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String numStr = sc.nextLine();
String[] numArr = numStr.split(" ");
int[] arr = new int[numArr.leng... | Main.java:12: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s829894932 | p02256 | Java | #include <stdio.h>
int main(){
int a,b,rem,tmp;
scanf("%d %d",&a,&b);
if(a<b){
tmp = a;
a = b;
b = tmp;
}
while(rem!=0){
rem = a%b;
a = b;
b = rem;
}
printf("%d",a);
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: class, interface, enum, or record expected
scanf("%d %d",&a,&b);
^
Main.java:6: error: class, interface, enum, or record expected
if(a<b)... |
s198023948 | p02256 | Java | #include <stdio.h>
int main(){
int x, y;
int r;
scanf("%d%d",&x,&y);
while(0!=y){
r=x%y;
x=y;
y=r;
}
printf("%d\n",x);
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int r;
^
(use --enable-preview to enable unnamed classes)
Main.java:6:... |
s042259776 | p02256 | Java | #include <stdio.h>
int main(){
int x, y;
int r;
scanf("%d%d",&x,&y);
while(0!=y){
r=x%y;
x=y;
y=r;
}
printf("%d\n",x);
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int r;
^
(use --enable-preview to enable unnamed classes)
Main.java:6:... |
s432682064 | p02256 | Java | #include <stdio.h>
int main(){
int a,b,rem,tmp;
scanf("%d %d",&a,&b);
if(a<b){
tmp = a;
a = b;
b = tmp;
}
while(rem!=0){
rem = a%b;
a = b;
b = rem;
}
printf("%d\n",a);
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: class, interface, enum, or record expected
scanf("%d %d",&a,&b);
^
Main.java:6: error: class, interface, enum, or record expected
if(a<b)... |
s733992543 | p02256 | Java | #include <stdio.h>
int main(){
int a,b,rem,tmp;
scanf("%d %d",&a,&b);
if(a<b){
tmp = a;
a = b;
b = tmp;
}
while(rem!=0){
rem = a%b;
a = b;
b = rem;
}
printf("%d\n",a);
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: class, interface, enum, or record expected
scanf("%d %d",&a,&b);
^
Main.java:6: error: class, interface, enum, or record expected
if(a<b)... |
s315233729 | p02256 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int tmp;
if (x<=y) {
tmp = x;
x = y;
y = tmp;
}
while (y > 0) {
x = x % y;
tmp = x;
x = y;
y = tmp;
}
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s297801729 | p02256 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int tmp;
if (x<=y) {
tmp = x;
x = y;
y = tmp;
}
while (y > 0) {
x = x % y;
tmp = x;
x = y;
y = tmp;
}
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s749314847 | p02256 | Java | import java.util.Scanner;
public class p1_2{
public static void main(String[] args){
int a,b,rem;
Scanner scan =new Scanner(System.in);
a=scan.nextInt();
b=scan.nextInt();
rem=a%b;
while(rem!=0){
a=b;
b=rem;
rem=a%b;
}
System.out.println(b);
}
}
| Main.java:2: error: class p1_2 is public, should be declared in a file named p1_2.java
public class p1_2{
^
1 error
|
s263004518 | p02256 | Java | package ex1;
import java.util.Scanner;
public class GreatestCommonDivisor {
public static void main(String[] args){
int z;
Scanner scanner=new Scanner(System.in);
int x = scanner.nextInt();
int y = scanner.nextInt();
while(true){
z=x%y;
if(z==0){
System.out.println(y);
break;
}
else{
x=y;
y=z;
... | Main.java:3: error: class GreatestCommonDivisor is public, should be declared in a file named GreatestCommonDivisor.java
public class GreatestCommonDivisor {
^
1 error
|
s984557873 | p02256 | Java | #include<stdio.h>
int main(){
int x,y,r;
scanf("%d%d",&x,&y);
while(x%y!=0){
r=x%y;
x=y;
y=r;
}
printf("%d\n",r);
return 0;
}
| Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:6: error: class, interface, enum, or record expected
scanf("%d%d",&x,&y);
^
Main.java:7: error: class, interface, enum, or record expected
while(x%y!=... |
s109074409 | p02256 | Java | #include <stdio.h>
int main(){
int num1,num2;
int kouho[100];
int i,j,count = 0;
scanf("%d %d",&num1,&num2);
if(num1 < num2){
for(i = 2;i<=num1;i++){
if(num1 % i == 0){
kouho[count] = i;
count++;
}
}
for(j = count;j>=0;j--){
if(num2 % kouho[j] == 0){
printf("%d\n",kouho[j]);... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: class, interface, enum, or record expected
int kouho[100];
^
Main.java:6: error: class, interface, enum, or record expected
int i,j,count... |
s755331188 | p02256 | Java | import java.util.Scanner;
public class GCD {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int a = x.nextInt();
int b = x.nextInt();// image a > b;
int r;
while(true) {
r = a % b;
if(r==0)break;
a = b;
b = r;
}
System.out.println(b);
}
}
| Main.java:3: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s866695986 | p02256 | Java | import java.util.Scanner;
public class GCD {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int a = x.nextInt();
int b = x.nextInt();// image a > b;
int r;
while(true) {
r = a % b;
if(r==0)break;
a = b;
b = r;
}
System.out.println(b);
}
}
| Main.java:3: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s875653228 | p02256 | Java |
import java.util.Scanner;
public class Sort {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int n=x.nextInt();
int[] a = new int [n];
for(int i=0;i<a.length;i++) {
a[i] = x.nextInt();
System.out.print(a[i]);
if(i < a.length -1) {
System.out.print(" ");
}
}
... | Main.java:3: error: class Sort is public, should be declared in a file named Sort.java
public class Sort {
^
1 error
|
s215350251 | p02256 | Java | import java.util.Scanner;
public class GCD {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int a = x.nextInt();
int b = x.nextInt();// image a > b;
int r;
while(true) {
r = a % b;
if(r==0)break;
a = b;
b = r;
}
System.out.println(b);
}
}
| Main.java:3: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s765368894 | p02256 | Java | import java.util.*;
public class B{
public static void main(String[] args){
int n = 1;
Scanner a = new Scanner(System.in);
int x = a.nextInt();
int y = a.nextInt();
if(x > y){
for(int i=1; i <= y/2; i++){
if(x%i == 0 && y%i == 0){
... | Main.java:3: error: class B is public, should be declared in a file named B.java
public class B{
^
1 error
|
s781103890 | p02256 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
while( a != b ){
if( a < b ){
b %= a;
} else if( a > b ){
a %= b;
}
}
System.out.println(a);
} | Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s775316503 | p02256 | Java | import java.util.Scanner;
public class GreatestCommonDivisor {
static int gcd(int a,int b){
if(b==0){
return a;
}else{
return gcd(b,a%b);
}
}
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int b=scan.nextInt();
System.out.println(gcd(Math.max(a,... | Main.java:2: error: class GreatestCommonDivisor is public, should be declared in a file named GreatestCommonDivisor.java
public class GreatestCommonDivisor {
^
1 error
|
s455248517 | p02256 | C | #include <stdio.h>
#define MAX 1000000
int main()
{
int i;
int str[MAX]
for( i=0; i<MAX; i++ )
{
str[i]=i;
}
printf("%d\n",i);
return 0;
}
| main.c: In function 'main':
main.c:9:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
9 | for( i=0; i<MAX; i++ )
| ^~~
main.c:11:9: error: 'str' undeclared (first use in this function)
11 | str[i]=i;
| ^~~
main.c:11:9: note: each undeclared identifier is... |
s688071242 | p02256 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s973041299 | p02256 | C | #include<stdio.h>
int gcd(int x,int y){return (y==0?x:gcd(y:x%y));}
int main(){
int x,y;
scanf("%d%d",&x,&y);
printf("%d\n",gcd(x,y));
return 0;
}
| main.c: In function 'gcd':
main.c:3:43: error: expected ')' before ':' token
3 | int gcd(int x,int y){return (y==0?x:gcd(y:x%y));}
| ~ ^
| )
main.c:3:38: error: too few arguments to function 'gcd'
3 | int gcd(int x,i... |
s298256164 | p02256 | C | #include<stdio.h>
int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
int main(){
int x,y;
scanf("%d%d",&x,&y);
printf("%d\n",gcd(x,y));
return 0;
}
| main.c: In function 'gcd':
main.c:3:44: error: expected ')' before ':' token
3 | int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
| ~ ^
| )
main.c:3:39: error: too few arguments to function 'gcd'
3 | int gcd(int ... |
s801252769 | p02256 | C | #include <stdio.h>
main(){
int x, y, c;
scanf("%d %d", &x, &y);
if (a < b){
c = a;
a = b;
b = c;
}
while (a % b != 0){
c = a % b;
a = b;
b = c;
}
printf("%d\n", a);
return 0;
}
| main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:8:8: error: 'a' undeclared (first use in this function)
8 | if (a < b){
| ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appear... |
s728354525 | p02256 | C | #include<stdio.h>
int main(void) {
intlonger a, b;
int c, d=1, i;
scanf("%d %d",&a, &b);
a < b ? (c = a):(c = b);
for(i = 1; i < c+1 ;i++) {
if(a%i == 0 && b%i == 0) {
d = i;
}
}
printf("%d\n",d);
return 0;
}
| main.c: In function 'main':
main.c:3:3: error: unknown type name 'intlonger'
3 | intlonger a, b;
| ^~~~~~~~~
|
s124089979 | p02256 | C | #include<stdio.h>
int main(void) {
int a, b, c, d=1, i;
scanf("%d %d",&a, &b);
if(a == b) {
d = a;
} else {
a>b ? (c = b):(c = a);
for(i = c; i > c/2-1; i--) {
if(a%i == 0 && b%i == 0) {
d = i;
break;
}
}
printf("%d\n",d);
return 0;
}
| main.c: In function 'main':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s268768044 | p02256 | C | #include <stdio.h>
int main () {
int x, y, d, i, b;
scanf("%d", &x); scanf("%d", &y);
if (x > y) {
b = x;
} else {
b = y;
}
for (i = b; i > 0; i--) {
if (x % i == 0; y % i == 0) {
d = i;
}
}
printf("%d", d);
return 0;
}
| main.c: In function 'main':
main.c:16:23: error: expected ')' before ';' token
16 | if (x % i == 0; y % i == 0) {
| ~ ^
| )
|
s494624151 | p02256 | C | #include<stdio.h>
int main(void){
int x, y, c, surplus;
scanf("%d %d",&x &y);
if(x < y){
c = x;
x = y;
y = c;
}
while(1){
surplus = x % y;
if(surplus == 0){
break;
}
x = y;
y = surplus;
}
printf(... | main.c: In function 'main':
main.c:6:22: error: invalid operands to binary & (have 'int *' and 'int')
6 | scanf("%d %d",&x &y);
| ~~ ^
| |
| int *
|
s960970192 | p02256 | C | #include<stdio.h>
int main(void){
int i,j,k;
scanf("%d %d",&i,&j);
for (i=0;i<j;i++)
| main.c: In function 'main':
main.c:6:3: error: expected expression at end of input
6 | for (i=0;i<j;i++)
| ^~~
main.c:6:3: error: expected declaration or statement at end of input
|
s449375838 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, d;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = 1; d <= y; d++) {
if (y % d == 0 && (x % y) % d == 0) {
c = d;
}
printf ("%d\n", c);
return 0;
}
| main.c: In function 'main':
main.c:18:8: error: 'c' undeclared (first use in this function)
18 | c = d;
| ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^... |
s473827069 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, d;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = 1; d <= y; d++) {
if (y % d == 0 && (x % y) % d == 0) {
c = d;
printf ("%d\n", c);
}
return 0;
}
| main.c: In function 'main':
main.c:18:8: error: 'c' undeclared (first use in this function)
18 | c = d;
| ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
22 | }
| ^... |
s092721165 | p02256 | C | #include<stdio.h>
int main(void){
int x,y;
scanf("%d %d",&x,&y);
if(x<y)
swap(x,y);
while(y>0){
r=x%y;
x=y;
y=r;
}
return x
}
| main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
8 | swap(x,y);
| ^~~~
main.c:10:7: error: 'r' undeclared (first use in this function)
10 | r=x%y;
| ^
main.c:10:7: note: each undeclared identifier is repor... |
s819655416 | p02256 | C | #include<stdio.h>
int main(void){
int x,y;
scanf("%d %d",&x,&y);
if(x<y)
swap(x,y);
while(y>0){
r=x%y;
x=y;
y=r;
}
printf("%d",x);
return 0;
}
| main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
8 | swap(x,y);
| ^~~~
main.c:10:7: error: 'r' undeclared (first use in this function)
10 | r=x%y;
| ^
main.c:10:7: note: each undeclared identifier is repor... |
s519390700 | p02256 | C | #include<stdio.h>
int main(void){
int x,y;
scanf("%d %d",&x,&y);
if(x<y){
swap(x,y);
}
while(y>0){
r=x%y;
x=y;
y=r;
}
printf("%d",x);
return 0;
}
| main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
8 | swap(x,y);
| ^~~~
main.c:11:7: error: 'r' undeclared (first use in this function)
11 | r=x%y;
| ^
main.c:11:7: note: each undeclared identifier is repor... |
s155355266 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, c, d;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = 1; d <= y; d++) {
if (y % d == 0 && (x % y) % d == 0) {
c = d;
}
printf ("%d\n", c);
return 0;
}
| main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
|
s141724182 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, d;
int c = 0;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = 1; d <= y; d++) {
if (y % d == 0 && (x % y) % d == 0 && c < d) {
c = d;
}
printf ("%d\n", c);
return 0;
}
| main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s949505147 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, d;
int c = 0;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = 2; d <= y; d++) {
if (y % d == 0 && (x % y) % d == 0 && c < d) {
c = d;
}
printf ("%d\n", c);
return 0;... | main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s230997357 | p02256 | C | #include<stdio.h>
int main(void){
int x,y,r;
scanf("%d %d",&x,&y);
if(x<y){
swap(x,y);
}
while(y>0){
r=x%y;
x=y;
y=r;
}
printf("%d\n",x);
return 0;
}
| main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
8 | swap(x,y);
| ^~~~
|
s203113791 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, c, d;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = y; d >= 2; d--) {
if (y % d == 0 && (x % y) % d == 0) {
break;
}
}
printf ("%d\n", c);
return 0;
}
| main.c:2:1: error: stray '\302' in program
2 | <U+00A0>
| ^~~~~~~~
main.c: In function 'main':
main.c:4:1: error: stray '\302' in program
4 | <U+00A0>
| ^~~~~~~~
main.c:5:1: error: stray '\302' in program
5 | <U+00A0><U+00A0><U+00A0>int x, y, z, c, d;
| ^~~~~~~~
main.c:5:2: error: stray '\... |
s705346162 | p02256 | C | #include<stdio.h>
int main(void) {
int x, y, z, d;
scanf("%d", &x);
scanf("%d", &y);
if (x < y) {
z = x;
x = y;
y = z;
}
for (d = y; d >= 2; d--) {
if (y % d == 0 && (x % y) % d == 0) {
break;
}
}
printf ("%d\n", d);
return 0;
}
| main.c:2:1: error: stray '\302' in program
2 | <U+00A0><U+00A0>
| ^~~~~~~~
main.c:2:2: error: stray '\302' in program
2 | <U+00A0><U+00A0>
| ^~~~~~~~
main.c: In function 'main':
main.c:4:1: error: stray '\302' in program
4 | <U+00A0><U+00A0>
| ^~~~~~~~
main.c:4:2: error: stray '\30... |
s731381411 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,c,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
c = x%y;
for(i=1;i<=y;i++){
if(y%i==0 && x%i==0){
k=i;
}
}
printf("%d\n",k);
return 0
}
| main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
17 | for(i=1;i<=y;i++){
| ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
25 | return 0
| ^
... |
s291865081 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,c,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
k = 0;
c = x%y;
for(i=1;i<=y;i++){
if(y%i==0 && x%i==0){
k = i;
}
}
printf("%d\n",k);
return 0
}
| main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
17 | for(i=1;i<=y;i++){
| ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
25 | return 0
| ^
... |
s183822398 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,c,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
k = 0;
c = x%y;
for(i=1;i<=y;i++){
if((y%i==0) && (x%i==0)){
k = i;
}
}
printf("%d\n",k);
return 0
}
| main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
17 | for(i=1;i<=y;i++){
| ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
25 | return 0
| ^
... |
s649831874 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,c,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
k = 0;
c = x%y;
for(i=1;i<=y;i++){
if((y%i==0) && (x%i==0)){
k = i;
}
}
printf("%d\n",k);
return 0
}
| main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
17 | for(i=1;i<=y;i++){
| ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
25 | return 0
| ^
... |
s458546248 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,c,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
k = 0;
c = x%y;
for(i=1;i<=y;i++){
if((y%i==0) && (x%i==0)){
k = i;
}
}
printf("%d\n",k);
return 0;
}
| main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
17 | for(i=1;i<=y;i++){
| ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
|
s959556794 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,c,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
k = 0;
for(i=1;i<=y;i++){
if((y%i==0) && (x%i==0)){
k = i;
}
}
printf("%d\n",k);
return 0;
}
| main.c: In function 'main':
main.c:16:5: error: 'i' undeclared (first use in this function)
16 | for(i=1;i<=y;i++){
| ^
main.c:16:5: note: each undeclared identifier is reported only once for each function it appears in
|
s539049213 | p02256 | C | #include <stdio.h>
int main(){
int x,y,t,k;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
k = 0;
for(i=1;i<=y;i++){
if((y%i==0) && (x%i==0)){
k = i;
}
}
printf("%d\n",k);
return 0;
}
| main.c: In function 'main':
main.c:16:5: error: 'i' undeclared (first use in this function)
16 | for(i=1;i<=y;i++){
| ^
main.c:16:5: note: each undeclared identifier is reported only once for each function it appears in
|
s720629554 | p02256 | C | #include <stdio.h>
int t(int x, int y){
if(y == 0){
return x;
}
else {
return t(y,x%y);
}
}
int main(){
int x,y;
scanf("%d %d\n",&x,&y);
if(y>x){
t = y;
y = x;
x = t;
}
printf("%d\n",t(x,y));
return 0;
}
| main.c: In function 'main':
main.c:19:4: error: lvalue required as left operand of assignment
19 | t = y;
| ^
main.c:21:4: error: assignment to 'int' from 'int (*)(int, int)' makes integer from pointer without a cast [-Wint-conversion]
21 | x = t;
| ^
|
s939793250 | p02256 | C | #include<stdio.h>
int main(void)
{
int r, a, b;
scanf_s("%d %d", &a, &b);
if (a < b)
{
r = a;
a = b;
b = r;
}
while (b > 0)
{
r = a % b;
a = b;
b = r;
}
printf("%d\n",r);
return 0;
}
| main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s322594665 | p02256 | C | #include<stdio.h>
int main(void)
{
int r, a, b;
scanf_s("%d %d", &a, &b);
if (a < b)
{
r = a;
a = b;
b = r;
}
while (b > 0)
{
r = a % b;
a = b;
b = r;
}
printf("%d\n",r);
return 0;
}
| main.c: In function 'main':
main.c:5:4: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s843627533 | p02256 | C | #include <stdio.h>
int gcd(x,y){
int new_x;
int new_y;
if(y=0) return x;
new_x=y;
new_y=x%y;
gcd(new_x,new_y)
}
int main(){
int x;
int y;
scanf("%d %d",&x,&y);
printf("%d",(gcd(x,y)));
return 0
}
| main.c: In function 'gcd':
main.c:2:5: error: type of 'x' defaults to 'int' [-Wimplicit-int]
2 | int gcd(x,y){
| ^~~
main.c:2:5: error: type of 'y' defaults to 'int' [-Wimplicit-int]
main.c:8:21: error: expected ';' before '}' token
8 | gcd(new_x,new_y)
| ^
| ... |
s697129062 | p02256 | C | #include<stdio.h>
int main(void) {
int X, Y;
int max, min;
int terget;
int i;
scanf_s("%d %d", &X, &Y);
if (X > Y) {
max = X;
min = Y;
}
else {
max = Y;
min = X;
}
terget = max % min;
i = terget;
while (i) {
if (terget%i == 0) {
break;
}
i--;
}
printf("%d\n", i);
return 0;
}
| main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%d %d", &X, &Y);
| ^~~~~~~
| scanf
|
s501765920 | p02256 | C | #include<stdio.h>
int main(void) {
int X, Y;
int min, max;
scanf_s("%d %d", &X, &Y);
max = X >= Y ? X : Y;
min = X >= Y ? Y : X;
while (max%min) {
max = max % min;
min = max >= min ? min : max;
}
printf("%d\n", max);
return 0;
}
| main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d %d", &X, &Y);
| ^~~~~~~
| scanf
|
s028576142 | p02256 | C | main(){
int a,b,c;
scanf("%d%d",&a,&b);
if(1<a<10^9 && 1<b<10^9){
while(a%b!=0){
c=a%b;
a=b;
b=c;
}
printf("%d\n",b);
}
return 0; | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d%d",&a,&b);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a decla... |
s972976536 | p02256 | C | #include <stdio.h>
int main(void){
/*宣言部*/
long nnum1, nnum2; /*nnum1, nnum2:自然数a, b*/
/*入力部*/
scanf("%d%d", &nnum1, &nnum2);
/*計算部*/ /*ユークリウッド互除法*/
for (;!(nnum1==nnum2;)){ /*nnum1とnnum2が等しくなるまでループ*/
/*大きい方から小さい方を引き続ける*/
if (nnum1 > nnum2){
nnum1 ... | main.c: In function 'main':
main.c:11:25: error: expected ')' before ';' token
11 | for (;!(nnum1==nnum2;)){ /*nnum1とnnum2が等しくなるまでループ*/
| ~ ^
| )
main.c:11:27: error: expected ';' before ')' token
11 | for (;!(nnum1==nnum2;)){ /*nnum1とnnum2が等... |
s761268201 | p02256 | C | #include<stdio.h>
#include<math.h>
int main(){
int a,b,g;
int i;
scanf("%d %d",&a,&b);
if(a>b){
a=a%b;
b=b%a;
for(i=1;i<=b;i++){
if(a%i==0&&b%i==0){
g=i;
}
}
}
else if(a<b){
b=b%a;
a=a%b;
for(i=1;i<=a;i++){
if(a%i==0&&b%i==0){
g=i;
}
}
}
else if(a==b){
g=a;
}
printf... | main.c: In function 'main':
main.c:33:9: error: expected declaration or statement at end of input
33 | return 0;
| ^~~~~~
|
s787844568 | p02256 | C | #include <iostream>
using namespace std;
int main(){
int a,b,tmp;
cin >> a;
cin >> b;
while(1){
if(b==0){
cout << a;
break;
}
}else{
tmp = a;
a = b;
b = tmp % b;
}
}
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s729235784 | p02256 | C | #include<iostream>
using namespace std;
int gcd(int x,int y){
int max;
if(y % (x % y)==0){
max = x % y;
return max;
}else{
gcd(y,x % y);
}
}
int main(){
int x,y;
cin >> x;
cin >> y;
if(x>=y)cout << gcd(x,y) << endl;
if(y>x)cout << gcd(y,x) << endl;
... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s654242650 | p02256 | C | #include<iostream>
using namespace std;
int gcd(int x,int y){
int max;
if(x == y){
return x;
}else if(y % (x % y)==0){
max = x % y;
return max;
}else{
gcd(y,x % y);
}
}
int main(){
int x,y;
cin >> x;
cin >> y;
if(x>=y)cout << gcd(x,y) << endl;
if... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s977553731 | p02256 | C | #include <stdio.h>
int GCD(int,int);
int main(void){
int a,b;
scanf("%d%d",&a,&b);
printf("%d\n",GCD(a,b));
return 0;
}
int GCD(int a, int b){
int r;
while(b!=0){
r=b;
b=a%b;
a=r;
} | main.c: In function 'GCD':
main.c:26:3: error: expected declaration or statement at end of input
26 | }
| ^
|
s036698629 | p02256 | C | #include<stdio.h>
int main(){
int a,b,c;
scan("%d %d",&a,&b);
if(1<=a && a<=1000000000 && 1<=b && b<=100000000){
while(a%b!=0){
c=a%b;
a=b;
b=c;
}
print("%d\n",c);
}
return 0;
} | main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration]
4 | scan("%d %d",&a,&b);
| ^~~~
| scanf
main.c:11:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declarat... |
s202996144 | p02256 | C | #include<stdio.h>
main(){
int x,y,z;
scanf("%d%d",&x,&y);
if(x < y){
z = y;
y = x;
x = z;
}
while(y != 0){
z = x % y;
x = y;
y = z;
}
printf("%d\n,x);
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:15:12: warning: missing terminating " character
15 | printf("%d\n,x);
| ^
main.c:15:12: error: missing terminating " character
15 | printf("%d\n,x);
| ... |
s483968516 | p02256 | C | #include <stdio.h>
#define MAX 100000
int main (void)
{
int i,j=0,a,b,x,y,d[MAX],gcd;
scanf ("%d %d",&x,&y);
if (x > y){
a = y;
b = x;
}else{
a = x;
b = y;
}
if (a == b) gcd = a;
else{
for (i = 1 ; i <= (b % a) ; i++){
if ((b % a) % i == 0){
d[j] = (b % a)/i;
j++;
... | main.c: In function 'main':
main.c:33:3: error: expected declaration or statement at end of input
33 | }
| ^
|
s792173411 | p02256 | C | #include<stdio.h>
int main(){
int x,y,z;
scanf("%d %d",&x,&y);
while (x%y! =0){
z = x % y;
x = y;
y = z;
}
printf("%d",y);
return 0;
} | main.c: In function 'main':
main.c:6:13: error: expected ')' before '!' token
6 | while (x%y! =0){
| ~ ^
| )
|
s063782124 | p02256 | C | #include<stdio.h>
int main(){
int x,y,z;
scanf("%d %d",&x,&y);
while (x%y! =0){
z = x % y;
x = y;
y = z;
}
printf("%d",y);
return 0;
} | main.c: In function 'main':
main.c:6:13: error: expected ')' before '!' token
6 | while (x%y! =0){
| ~ ^
| )
|
s795862496 | p02256 | C | else
{
while(c != 0)
{
c = b % a;
if(c == 0)
{
printf("%d\n",a);
}
else
{
b = a;
a = c;
}
}
} | main.c:1:2: error: expected identifier or '(' before 'else'
1 | else
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.