submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s349430200 | p03773 | C | int main(void){
//int 24times[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}
int c1;
char buf[256];
fgets(buf,256,stdin);
sscanf(buf,"%d",%c1);
int c2;
char buf[256];
fgets(buf,256,stdin);
sscanf(buf,"%d",%c2);
while(c1 > 24){
c1 = c1-24;
}
while(c2 > 24){
c2 = c2-24;
}
... | main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
7 | fgets(buf,256,stdin);
| ^~~~~
main.c:7:23: error: 'stdin' undeclared (first use in this function)
7 | fgets(buf,256,stdin);
| ^~... |
s077759225 | p03773 | C | int main(void){
//int 24times[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}
int c1;
int c2;
char buf[256];
fgets(buf,256,stdin);
sscanf(buf,"%d",%c1);
sscanf(buf,"%d",%c2);
while(c1 > 24){
c1 = c1-24;
}
while(c2 > 24){
c2 = c2-24;
}
int t = c1 + c2;
while(t > 24){
t =... | main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
8 | fgets(buf,256,stdin);
| ^~~~~
main.c:8:23: error: 'stdin' undeclared (first use in this function)
8 | fgets(buf,256,stdin);
| ^~... |
s270725866 | p03773 | C | int main void{
//int 24times[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}
int c1;
int c2;
char buf[256];
fgets(buf,256,stdin);
sscanf(buf,"%d",%c1);
sscanf(buf,"%d",%c2);
while(c1 > 24){
c1 = c1-24;
}
while(c2 > 24){
c2 = c2-24;
}
int t = c1 + c2;
while(t > 24){
t = ... | main.c:1:9: error: expected ';' before 'void'
1 | int main void{
| ^~~~~
| ;
main.c:1:14: error: expected identifier or '(' before '{' token
1 | int main void{
| ^
|
s614517658 | p03773 | C | int main void{
//int 24times[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}
int c1;
int c2;
char buf[256];
fgets(buf,256,stdin);
sscanf(buf,"%d",%c1);
sscanf(buf,"%d",%c2);
while(c1 > 24){
c1 = c1-24;
}
while(c2 > 24){
c2 = c2-24;
}
int t = c1 + c2;
while(t > 24){
t = ... | main.c:1:9: error: expected ';' before 'void'
1 | int main void{
| ^~~~~
| ;
main.c:1:14: error: expected identifier or '(' before '{' token
1 | int main void{
| ^
|
s925471481 | p03773 | C | #include <stdio.h>
#include <stdlib.h>
//int main(int argc, char *argv[]){
// int A = atoi(argv[1]);
// int B = atoi(argv[2]);
// int C;
int main(void){
int A;
int B;
scanf("%d",&A);
scanf("%d",&B);
C = A + B;
if(C > 23){
C = C - 24;
printf("%d\n",C);
}else{
printf("%d\n",C);
}
return ... | main.c: In function 'main':
main.c:15:3: error: 'C' undeclared (first use in this function)
15 | C = A + B;
| ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
|
s526736088 | p03773 | C++ | #include <algorithm>
#include <iostream>
using namespace std;
long long int a,b,c;
int main(){
cin>>a>>b;
c=a+b;
for(int i=0;i<2;i++){
if(c>24){
c-=24;
if(c<=24){
brake;
}
}
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:13:1: error: 'brake' was not declared in this scope
13 | brake;
| ^~~~~
|
s699067421 | p03773 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int a,b;
cin>>a,b;
a=a+b;
cout<<a%24<<endl;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'b' was not declared in this scope
6 | cin>>a,b;
| ^
|
s057958105 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void){
// Here your code !
int start, reaming;
cin >> start >> reaming;
if((start + reaming) > 24){
cout << (start + reaming) - ((start + reaming) / 24));
}else{
cout << (start + reaming);
}
}
| a.cc: In function 'int main()':
a.cc:8:61: error: expected ';' before ')' token
8 | cout << (start + reaming) - ((start + reaming) / 24));
| ^
| ;
|
s590450011 | p03773 | C++ | c, d = map(int, input().split())
print((c + d)%24) | a.cc:1:1: error: 'c' does not name a type
1 | c, d = map(int, input().split())
| ^
|
s401879106 | p03773 | C++ | #include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
int main(void)
{
int n, a, b, max, ans = 9999999999999;
max = sqrt((double)n);
for (int i = 1; i <= max; i++)
if (n % i) ans = min(ans, log10(n / i) + 1)... | a.cc: In function 'int main()':
a.cc:8:33: warning: overflow in conversion from 'long int' to 'int' changes value from '9999999999999' to '1316134911' [-Woverflow]
8 | int n, a, b, max, ans = 9999999999999;
| ^~~~~~~~~~~~~
a.cc:11:29: error: no matching function for cal... |
s771509595 | p03773 | C++ | #include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
int main(void)
{
int n, a, b, max, ans = 9999999999999;
max = sqrt((double)n);
for (int i = 1; i <= MAX; i++)
if (n % i) ans = min(ans, log10(N / i) + 1);
cout << ans << endl;
return 0;
... | a.cc: In function 'int main()':
a.cc:8:29: warning: overflow in conversion from 'long int' to 'int' changes value from '9999999999999' to '1316134911' [-Woverflow]
8 | int n, a, b, max, ans = 9999999999999;
| ^~~~~~~~~~~~~
a.cc:10:26: error: 'MAX' was not declared in this scope... |
s913850203 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,N,M; cin >> N >> M;
int A[50],B[50],C[50],D[50],ans[50],num[50];
int dis;
//cout << N << M <<endl;
//Input of Students
for(int i=0; i < N; i++)
cin >> A[i] >> B[i];
//Input of Check Point
for(int i=0; i < M; i++)
cin >> C[i] >> D[i];
dis = ... | a.cc: In function 'int main()':
a.cc:37:39: error: expected '}' at end of input
37 | cout << num[i] <<endl;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s956871307 | p03773 | C++ | include<iostream>
using namespace std;
int main(){
int A,B; cin >> A >> B;
if(A+B<=24)
cout << A+B << endl;
else
cout << A+B -24<< endl;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:18: error: 'cin' was not declared in this scope
7 | int A,B; cin >> A >> B;
| ^~~
a.cc:10:17: error: 'cout' was not declared in this scope
10 | ... |
s255472093 | p03773 | C | include <stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",(a+b)%24);
return 0;
}
| main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s786402634 | p03773 | C++ | include <iostream>
using namespace std;
int main(){
int A;
int B;
cin >> A >> B;
if((A+B)<=24){
cout<<A+B<<endl;}
else{
cout<<(A+B)-24<<endl;}
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> A >> B;
| ^~~
a.cc:10:17: error: 'cout' was not declared in this scope
10 | cout<<A+B<<... |
s590567205 | p03773 | C++ |
a, b = map(int, input().split(" "));
print( (a+b) % 24); | a.cc:2:1: error: 'a' does not name a type
2 | a, b = map(int, input().split(" "));
| ^
a.cc:3:6: error: expected constructor, destructor, or type conversion before '(' token
3 | print( (a+b) % 24);
| ^
|
s921153929 | p03773 | C | include <stdio.h>
int main(){
int a, b;
scanf("%d %d", &a, &b)
if((a+b)>=24) printf("%d\n", ((a+b)-24));
else printf("%d\n", (a+b));
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s726984758 | p03773 | C++ | include <stdio.h>
int main(){
int a, b;
scanf("%d %d", &a, &b)
if((a+b)>=24) printf("%d\n", ((a+b)-24));
else printf("%d\n", (a+b));
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
|
s250148209 | p03773 | C++ | include <stdio.h>
int main(){
int a, b;
a = 20;
b = 5;
if((a+b)>=24) printf("%d\n", ((a+b)-24));
else printf("%d\n", (a+b));
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
|
s000335786 | p03773 | Java | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int time = a + b;
if (time >= 24) {
time -= 24;
}
System.out.println(time);
scan.close();
}
}
| Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s114917447 | p03773 | Java | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int time = a + b;
if (time > 24) {
time -= 24;
}
System.out.println(time);
scan.close();
}
}
| Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s439645677 | p03773 | Java | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int time = a + b;
if (time > 24) {
time -= 24;
}
System.out.println(time);
}
}
| Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s827196255 | p03773 | Java | #include<stdio.h>
int main(void){
int a,b;
scanf("%d%d",&a,&b);
printf("%d\n",(a + b) % 24);
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
print... |
s016997439 | p03773 | 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();
int C = A + B;
if(C > 24){
C = C-24;
}
System.out.println(C);
}
} | Main.java:4: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s678535834 | p03773 | C++ | #inlcude <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a + b) % 24 << endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude <iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
5 | cin >> a >> b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostr... |
s767702663 | p03773 | C++ | using ll=long long;
using R=double;
// Combination Table
ll C[51][51]; // C[n][k] -> nCk
void comb_table(int N){
for(int i=0;i<=N;++i){
for(int j=0;j<=i;++j){
if(j==0 or j==i){
C[i][j]=1LL;
}else{
C[i][j]=(C[i-1][j-1]+C[i-1][j]);
}
}
}
}
int main(void){
int N,A,B;
cin >> N >> A >> B;
const int NMAX=... | a.cc: In function 'int main()':
a.cc:21:2: error: 'cin' was not declared in this scope
21 | cin >> N >> A >> B;
| ^~~
a.cc:31:2: error: 'sort' was not declared in this scope; did you mean 'short'?
31 | sort(v,v+N);
| ^~~~
| short
a.cc:32:2: error: 'reverse' was not declared in this scope
... |
s685852627 | p03773 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n, m, a[50], b[50], c[50], d[50];
cin >> n >> m;
for(int i = 0; i < n; i++)cin >> a[i] >> b[i];
for(int i = 0; i < m; i++)cin >> c[i] >> d[i];
for(int i = 0; i < n; i++){
int mindist = 300000000;
int mini = -1;
for(i... | a.cc: In function 'int main()':
a.cc:16:7: error: expected ',' or ';' before 'if'
16 | if(mindist > dist){
| ^~
|
s544135271 | p03773 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n, m, a[50], b[50], c[50], d[50];
cin >> n >> m;
for(int i = 0; i < n; i++)cin >> a[i] >> b[i];
for(int i = 0; i < m; i++)cin >> c[i] >> d[i];
for(int s = 0; s < n; s++){
int mindist = 300000000;
int mini = -1;
for(int... | a.cc: In function 'int main()':
a.cc:15:24: error: 'i' was not declared in this scope
15 | int dist = abs(a[i] - c[cpi]) + (b[i] - d[cpi])
| ^
|
s548381096 | p03773 | C++ | a, b = (int(i) for i in input().split())
print (a+b)%24 | a.cc:1:1: error: 'a' does not name a type
1 | a, b = (int(i) for i in input().split())
| ^
|
s318511804 | p03773 | C++ | a, b=map(int, input().split())
c=a+b
if c<24:
print (c)
elif c>=24:
print (c-24)
| a.cc:1:1: error: 'a' does not name a type
1 | a, b=map(int, input().split())
| ^
|
s213840027 | p03773 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class beginner057 {
public static void main(String[]args)throws IOException{
BufferedReader br=
new BufferedReader(new InputStreamReader(System.in));
String str1=br.readLine();
String[] str2 = str1.split("... | Main.java:6: error: class beginner057 is public, should be declared in a file named beginner057.java
public class beginner057 {
^
1 error
|
s603450058 | p03773 | 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();
System.our.println((a+b)%24);
}
} | Main.java:7: error: cannot find symbol
System.our.println((a+b)%24);
^
symbol: variable our
location: class System
1 error
|
s241613460 | p03773 | 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();
System.our.println((a+b)%24)
}
} | Main.java:7: error: ';' expected
System.our.println((a+b)%24)
^
1 error
|
s872563438 | p03773 | C++ | A,B = map(int, input().split())
print((A+B)%24) | a.cc:1:1: error: 'A' does not name a type
1 | A,B = map(int, input().split())
| ^
|
s136147930 | p03773 | C | #include <stdio.h>
int abs(int j)
{
return (j>0) ? j : -j;
}
int main()
{
int N, M, i, j;
int a[50], b[50], c[50], d[50],;
int p[50] = {0};
scanf("%d %d", &N, &M);
for(i=0; i<N; i++)
{
scanf("%d %d", &a[i], &b[i]);
}
for(j=0; j<M; j++)
{
scanf("%d %... | main.c: In function 'main':
main.c:11:36: error: expected identifier or '(' before ';' token
11 | int a[50], b[50], c[50], d[50],;
| ^
main.c:30:96: error: expected ')' before '{' token
30 | if(abs(a[i] - c[j]) + abs(b[i] - d[j]) < abs(a[i] - c[p[i]]) + ab... |
s483717833 | p03773 | 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();
int ans
if(a+b<24){
ans=a+b-24;
}else{
ans=a+b;
}
System.out.println(ans);
}
}
| Main.java:8: error: ';' expected
int ans
^
1 error
|
s974459831 | p03773 | C++ | print(A+B%24) | a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
1 | print(A+B%24)
| ^
|
s387670131 | p03773 | Java | import java.util.Scanner;
public class RemainingTime {
public static void main(String[] args) {
// input
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
scan.close();
int res = (a + b) % 24;
// output
System.out.println(res);
}
} | Main.java:3: error: class RemainingTime is public, should be declared in a file named RemainingTime.java
public class RemainingTime {
^
1 error
|
s296467803 | p03773 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = Scanner(System.in);
int n = Integer.parseInt(sc.next());
int m = Integer.parseInt(sc.next());
System.out.println((n + m) % 24);
sc.close();
}
} | Main.java:5: error: cannot find symbol
Scanner sc = Scanner(System.in);
^
symbol: method Scanner(InputStream)
location: class Main
1 error
|
s760929359 | p03773 | C++ | 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();
int C=(A+B)%24;
System.out.println(C);
sc.close();
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s857840500 | p03773 | C++ | #include <iostream>
#include <stdint>
using namespace std;
int main()
{
int_least32_t a, b;
cin >> a >> b;
if(a + b > 24) {
cout << a + b - 24 << endl;
}
else {
cout << a + b << endl;
}
} | a.cc:2:10: fatal error: stdint: No such file or directory
2 | #include <stdint>
| ^~~~~~~~
compilation terminated.
|
s860154584 | p03773 | C | #include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
int main(void)
{
int i, num, rem,min,len;
double lim;
char wln[13];
//整数Nの入力
scanf("%d", &num);
lim = sqrt(num)-1.0;
min = 11;
for (i = num; i >lim; i--) {
rem = num%i;
if (rem == 0) {
itoa(i, wln, 10);
len= strlen(wln);
... | main.c: In function 'main':
main.c:21:25: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
21 | itoa(i, wln, 10);
| ^~~~
|
s949291799 | p03773 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
int a, b,time;
Scanner sc = new Scanner();
a = sc.nextInt();
b = sc.nextInt();
time = (a+b) % 24;
System.out.println(time);
}
}
| Main.java:6: 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) is not applicable
(actu... |
s219476939 | p03773 | Java | public class Main{
public static void main(String[] args){
int a, b,time;
Scanner sc = new Scanner();
a = sc.nextInt();
b = sc.nextInt();
time = (a+b) % 24;
System.out.println(time);
}
}
| Main.java:4: error: cannot find symbol
Scanner sc = new Scanner();
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner();
^
symbol: class Scanner
location: class Main
2 errors
|
s068604611 | p03773 | Java | public class Main{
public static main(String[] args){
int a, b,time;
Scanner sc = new Scanner();
a = sc.nextInt();
b = sc.nextInt();
time = (a+b) % 24;
System.out.println(time);
}
}
| Main.java:2: error: invalid method declaration; return type required
public static main(String[] args){
^
1 error
|
s467956220 | p03773 | Java | import java.util.*;
import java.lang.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int W = Integer.parseInt(sc.next());
int ans;
if(N+W>24) ans = Math.abs(24-(N... | Main.java:16: error: ';' expected
else ans = N+W
^
1 error
|
s102012413 | p03773 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Dell on 28-03-2017.
*/
public class TaskB {
static void solve(Long[] numbers, int a, int b) {
... | Main.java:12: error: class TaskB is public, should be declared in a file named TaskB.java
public class TaskB {
^
1 error
|
s319119817 | p03773 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c=(a+b)%24;
System.out.println(c);
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s574603910 | p03773 | Java | Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c=(a+b)%24;
System.out.println(c); | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
System.out.println(c);
^
2 errors
|
s036609157 | p03773 | Java | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt(),b = scanner.nextInt();
if(a + b > 24){
System.out.println((a + b) % 24);
}else if(a + b == 24){
System.out.println(0);
}else{
System.out.println(a... | Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s090831930 | p03773 | C++ | #include <cstdio>
using namespace std;
int a,b;
int main(){
scanf("%d %d",&a,&b);
printf("%d\n",(a+b)%24);
return 0;
} | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:4:1: error: extended character is not valid in an identifier
4 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2... |
s258916880 | p03773 | C++ | #include <cstdio>
using namespace std;
int a,b;
int main(){
scanf("%d %d",&a,&b);
printf("%d\n",(a+b)%);
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:21: error: expected primary-expression before ')' token
9 | printf("%d\n",(a+b)%);
| ^
|
s634730185 | p03773 | Java | import java.util.Scanner;
public class RemainingTime {
private Scanner scanner = new Scanner(System.in);
private void main() {
int currentHours = scanner.nextInt();
int contestBeginFor = scanner.nextInt();
System.out.println((currentHours + contestBeginFor) % 24);
}
public s... | Main.java:3: error: class RemainingTime is public, should be declared in a file named RemainingTime.java
public class RemainingTime {
^
1 error
|
s999988217 | p03773 | C++ | x,y = map(int, input().split(' '))
print((x+y)%24) | a.cc:1:1: error: 'x' does not name a type
1 | x,y = map(int, input().split(' '))
| ^
|
s354117179 | p03773 | Java | public class Main{
private static Scanner sc;
public static void main(String[] args) {
// TODO Auto-generated method stub
sc = new Scanner(System.in);
int A =sc.nextInt();
int B =sc.nextInt();
int K;
K=A+B;
if(K>=24){
K=K-24;
}
System.out.println(K);
}
}
| Main.java:2: error: cannot find symbol
private static Scanner sc;
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s238987570 | p03773 | C++ | #include<iostream>
using namespace std;
void main() {
int a, b;
cin >> a >> b;
cout << (a + b) % 24 << endl;
} | a.cc:4:1: error: '::main' must return 'int'
4 | void main() {
| ^~~~
|
s736350071 | p03773 | C++ | #include<stdio.h>
int a ;
int b ;
void main() {
int x = a + b;
if (x >= 24) {
printf("%d\n", x - 24);
} printf("%d\n",x);
} | a.cc:4:1: error: '::main' must return 'int'
4 | void main() {
| ^~~~
|
s456657729 | p03773 | C++ | #include<stdio.h>
int a = 9;
int b = 12;
void main() {
int x = a + b;
if (x >= 24) {
printf("%d\n", x - 24);
} printf("%d\n",x);
} | a.cc:4:1: error: '::main' must return 'int'
4 | void main() {
| ^~~~
|
s764472688 | p03773 | C++ | #include<stdio.h>
int a = 9;
int b = 12;
void solve() {
int x = a + b;
if (x >= 24) {
printf("%d\n", x - 24);
} printf("%d\n",x);
} | /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
|
s409722305 | p03773 | C++ | a,b=gets.split.map &:to_i;p (a+b)%24 | a.cc:1:1: error: 'a' does not name a type
1 | a,b=gets.split.map &:to_i;p (a+b)%24
| ^
a.cc:1:29: error: expected constructor, destructor, or type conversion before '(' token
1 | a,b=gets.split.map &:to_i;p (a+b)%24
| ^
|
s691497858 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
int ans;
ans = a + b;
cout << ans > 24 ? ans - 24 : ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:21: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int')
11 | cout << ans > 24 ? ans - 24 : ans << endl;
| ~~~~~~~~~~~ ^ ~~
| | |
| | int
| std::bas... |
s798819492 | p03773 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin << a << b;
int c = a + b;
if(c >= 24) c = c - 24;
cout >> c >> endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << a << b;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>... |
s275483935 | p03773 | C | #include <stdio.h>
int main(){
int a, b;
scanf("%d %d",&a,&b);
prinft("%d¥n",(a+b)%24);
return 0;
} | main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'prinft'; did you mean 'printf'? [-Wimplicit-function-declaration]
6 | prinft("%d¥n",(a+b)%24);
| ^~~~~~
| printf
|
s213942112 | p03773 | C++ | import Control.Applicative
main = do
ss <- (map read . words) <$> getLine
putStrLn (sum ss `mod` 24) | a.cc:5:20: error: stray '`' in program
5 | putStrLn (sum ss `mod` 24)
| ^
a.cc:5:24: error: stray '`' in program
5 | putStrLn (sum ss `mod` 24)
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import Control.Applicative
| ^~~~~~
a.cc:1:1:... |
s720538541 | p03773 | C | include<stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
int h;
h = (a + b) % 24;
printf("%d\n",h);
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s053679190 | p03773 | Java | public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.println((s.nextInt() + s.nextInt())%24);
}
} | Main.java:3: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s001312105 | p03773 | C++ | #include<stdio.h>
#include<math.h>
int main()
{
int N;
scanf("%d",&N);
int A,B,i,least,f;
for(A=1;A<=N;A++)
{
if(N%A)
continue;
else
B=N/A;
if(A>=B)
{
while(A/pow(10,i)>1)
i++;
f=(int)(A/pow(10,i);
}
else
{
while(B/pow(10,i)>1)
i++;
f=(i... | a.cc: In function 'int main()':
a.cc:18:26: error: expected ')' before ';' token
18 | f=(int)(A/pow(10,i);
| ~ ^
| )
a.cc:24:26: error: expected ')' before ';' token
24 | f=(int)(B/pow(10,i);
| ~ ^
| ... |
s281944936 | p03773 | C++ | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
scanf("%d %d", &a,&b);
if (a+b=>24){c=a+b-24;}
else{c=a+b;}
printf("%d",c);
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '>' token
7 | if (a+b=>24){c=a+b-24;}
| ^
|
s386315513 | p03773 | C++ | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
scanf("%d %d", &a,&b);
if (a+b>24){c=a+b-24}
printf("%d",c);
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:25: error: expected ';' before '}' token
7 | if (a+b>24){c=a+b-24}
| ^
| ;
|
s386221449 | p03773 | C++ |
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
// 問2
class cPOINT{
public:
long lnX;
long lnY;
cPOINT() { lnX = 0; lnY = 0; };
cPOINT& operator=(const cPOINT &obj);
cPOINT operator-(const cPOINT &obj);
double calc();
};
cPOINT& cPOINT::operat... | a.cc: In function 'int main()':
a.cc:70:36: error: 'LONG_MAX' was not declared in this scope
70 | double dbNearVal = LONG_MAX; // 1番近いチェックポイントまでの距離
| ^~~~~~~~
a.cc:7:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#... |
s068914809 | p03773 | C++ | #include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",(a+b)%24);j
return(0);
}
| a.cc: In function 'int main()':
a.cc:5:27: error: 'j' was not declared in this scope
5 | printf("%d\n",(a+b)%24);j
| ^
|
s552293605 | p03773 | C++ | #include <iostream>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if ( ( A + B ) < 24 ) cout << A + B << endl;
else cout << (A + B) - 24 enld;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:34: error: expected ';' before 'enld'
9 | else cout << (A + B) - 24 enld;
| ^~~~~
| ;
|
s423991752 | p03773 | C | #include<stdio.h>
int degits(long long a){
if(a<10) return 1;
return 1+degit(a/10);
}
int F(long long a,long long b){
int ad,bd;
ad=degits(a);
bd=degits(b);
return ((ad>bd)?ad:bd);
}
int main(int argc, char const *argv[]){
long long n,i;
int min;
scanf("%lld",&n);
min=degits(n);
for(i=2;i*i<=n;i++){
if(... | main.c: In function 'degits':
main.c:5:18: error: implicit declaration of function 'degit'; did you mean 'degits'? [-Wimplicit-function-declaration]
5 | return 1+degit(a/10);
| ^~~~~
| degits
main.c: In function 'main':
main.c:25:25: error: expected ';' before '... |
s385327487 | p03773 | Java | import java.util.*;
class Main{
public static void main(String[]args){
Scanner cin=new Scanner(System.in);
int result;
int nowT=Integer.paseInt(cin.next());
int addT=Integer.paseInt(cin.next());
if(nowT+addT>23){
result = nowT+addT-24;
... | Main.java:7: error: cannot find symbol
int nowT=Integer.paseInt(cin.next());
^
symbol: method paseInt(String)
location: class Integer
Main.java:8: error: cannot find symbol
int addT=Integer.paseInt(cin.next());
^
symbol: method pa... |
s059571533 | p03773 | Java | import java.util.*;
class Main{
public static void main(String[]args){
Scanner cin=new Scanner(System.in);
int result;
int nowT=Integer.paserInt(cin.next());
int addT=Integer.paserInt(cin.next());
if(nowT+addT>23){
result = nowT+addT-24;
... | Main.java:7: error: cannot find symbol
int nowT=Integer.paserInt(cin.next());
^
symbol: method paserInt(String)
location: class Integer
Main.java:8: error: cannot find symbol
int addT=Integer.paserInt(cin.next());
^
symbol: method... |
s584333167 | p03773 | C++ | #include<iostream>
int main(){
int a,b;
cin>>a>>b;
a=a+b;
if(a>23)a=a%24;
cout<<a<<"\n";
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard... |
s955151580 | p03773 | C++ | #include<iostream>
int main(){
int a,b;
cin>>a>>b;
a=a+b;
if(a>=24)a=a%24;
cout<<a<<"\n";
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard... |
s895752444 | p03773 | Java | import java.util.*;
class Main{
public static void main(String[]args){
Scanner cin=new Scanner(System.in);
int nowT;
int addT;
int result;
nowT=Integer.paserInt(cin.next());
addT=Integer.paserInt(cin.next());
if(nowT+addT>23){
resu... | Main.java:8: error: cannot find symbol
nowT=Integer.paserInt(cin.next());
^
symbol: method paserInt(String)
location: class Integer
Main.java:9: error: cannot find symbol
addT=Integer.paserInt(cin.next());
^
symbol: method paserInt(String... |
s821101492 | p03773 | C++ | #include<iostream>
int main(){
int a,b;
cin>>a>>b;
a=a+b;
if(a>24)a=a%24;
cout<<a<<"\n";
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard... |
s505402606 | p03773 | Java | import java.util.*;
public class Q1 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] input = scanner.nextLine().trim().split(" ");
int a = Integer.parseInt(input[0]);
int b = Integer.parseInt(input[1]);
System.out.println((a + b) ... | Main.java:3: error: class Q1 is public, should be declared in a file named Q1.java
public class Q1 {
^
1 error
|
s578596849 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
cout<<(a+b)%24
}
| a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before '}' token
6 | cout<<(a+b)%24
| ^
| ;
7 | }
| ~
|
s686442029 | p03773 | Java |
import java.io.*;
import java.util.*;
public class TestClass {
static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) throws Exception{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String s[] = in.readLine().split(" ");
int a = Integer.parseI... | Main.java:5: error: class TestClass is public, should be declared in a file named TestClass.java
public class TestClass {
^
1 error
|
s155056490 | p03773 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main()
{
// freopen("in.txt","r",stdin);
int a, b;
while (~scanf("%d%d", &a, &b))
{
a += b;
a %= 24
printf("%d\n", a);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:13: error: expected ';' before 'printf'
12 | a %= 24
| ^
| ;
13 | printf("%d\n", a);
| ~~~~~~
|
s595671028 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
a += b;
if (a >= 24) {
a -= 24;
}
cout << a << endl;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: '\U000000a0' does not name a type
3 |
| ^
|
s749126535 | p03773 | C++ | #include <iostream>
using namespace std;
int a. b;
int main() {
cin >> a >> b;
cout << (a + b) % 24;
return 0;
} | a.cc:3:6: error: expected initializer before '.' token
3 | int a. b;
| ^
a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin >> a >> b;
| ^
a.cc:5:15: error: 'b' was not declared in this scope
5 | cin >> a >> b;
| ^
|
s195730441 | p03773 | C++ | #include "stdafx.h"
#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a + b <= 23) cout << a + b << endl;
else cout << a + b - 24 << endl;
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s638442505 | p03773 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
int main() {
int A, B;
scanf("%d %d%*c", &A, &B);
printf("%d\n", (A + B) % 24;
return 0;
}
| main.c: In function 'main':
main.c:10:30: error: expected ')' before ';' token
10 | printf("%d\n", (A + B) % 24;
| ~ ^
| )
main.c:11:12: error: expected ';' before '}' token
11 | return 0;
| ^
| ;
12 | }
... |
s934211756 | p03773 | C++ | #include "stdafx.h"
#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a + b <= 23) cout << a + b << endl;
else cout << a + b - 24 << endl;;
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s888091096 | p03773 | C++ | include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
int A, B;
cin >> A >> B;
cout << (A + B) % 24 << endl;
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a typ... |
s301484794 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;cin>>a>>b>>;
cout<<(a+b)%24<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before ';' token
4 | int a,b;cin>>a>>b>>;
| ^
|
s649974510 | p03773 | C++ | import java.io.*;
import java.util.*;
import java.math.*;
class Main {
InputStream is;
PrintWriter out;
void solve(){
//Enter code here
int n = ni() , m = ni();
while (m-- > 0) {
n += 1;
if (n == 25) n = 1;
}
out.println(n);
}
pu... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s426590332 | p03773 | C++ | a,b = map(int,input().split())
c = (a+b)%24
print(c) | a.cc:1:1: error: 'a' does not name a type
1 | a,b = map(int,input().split())
| ^
|
s601404129 | p03773 | C++ | print sum(map(int, raw_input().split()))%24 | a.cc:1:1: error: 'print' does not name a type; did you mean 'int'?
1 | print sum(map(int, raw_input().split()))%24
| ^~~~~
| int
|
s416708832 | p03773 | C++ | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class TEST{
static void Main(){
Sol mySol =new Sol();
mySol.Solve();
}
}
class Sol{
public void Solve(){
var d = ria();
Console.WriteLine(d.Sum() % 24);
}
public Sol(){
}
static String r... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collectio... |
s602576289 | p03773 | C++ | $include<bits/stdc++.h>
using namespace std;
#define r(i,n) for(int i=0;i<n;i++)
#define R(i,a,n) for(int i=a;i<n;i++)
int main(){
int n,a,b;
string s;
cin>>a>>b;
a+=b;
if(a>23)a-=23;
cout<<a<<endl;
} | a.cc:1:1: error: '$include' does not name a type
1 | $include<bits/stdc++.h>
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
7 | string s;
| ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope
8 | cin>>a>>b;
| ^~~
a.cc:11... |
s511874443 | p03773 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <uno... | a.cc: In function 'int main()':
a.cc:67:20: error: expected primary-expression before '>' token
67 | cin >> a > >b;
| ^
|
s873201512 | p03774 | C++ | signed main()
{
//入力の高速化用のコード
//ios::sync_with_stdio(false);
//cin.tie(nullptr);
ll n, m;
cin >> n >> m;
ll a[n], b[n], c[m], d[m];
rep(i, n)
{
cin >> a[i] >> b[i];
}
rep(i, m)
{
cin >> c[i] >> d[i];
}
ll dif_min;
ll count;
rep(i, n)
{
... | a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
7 | ll n, m;
| ^~
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin >> n >> m;
| ^~~
a.cc:8:12: error: 'n' was not declared in this scope
8 | cin >> n >> m;
| ^
a... |
s724385038 | p03774 | C++ | #include <bits/stdc++.h>
#include <regex>
using namespace std;
//type
typedef long long int ll;
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#de... | a.cc: In function 'int main()':
a.cc:185:14: error: 'x' was not declared in this scope
185 | }x
| ^
|
s310494761 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
int[][] a = new int[n][2];
for(int i=0; i<n; i++){
for(int j=0; j<2; j++){
a[i][j] = scn.nextInt();
... | Main.java:21: error: incompatible types: possible lossy conversion from double to int
int min = Math.pow(10, 8);
^
1 error
|
s501398800 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
int[][] a = new int[n][2];
for(int i=0; i<n; i++){
for(int j=0; j<2; j++){
a[i][j] = scn.nextInt();
... | Main.java:14: error: incompatible types: int[][] cannot be converted to int[]
int[] c = new int[m][2];
^
Main.java:17: error: array required, but int found
c[i][j] = scn.nextInt();
^
Main.java:21: error: incompatible types: possible lossy conversion from double to int
int min = M... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.