submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s882528103 | p03773 | Java | 23 2 | Main.java:1: error: class, interface, enum, or record expected
23 2
^
1 error
|
s835373219 | p03773 | C++ | Powers of two | a.cc:1:1: error: 'Powers' does not name a type
1 | Powers of two
| ^~~~~~
|
s751198652 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
cin>>a>>b;
cout<<(a+b)%24;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:14: error: 'a' was not declared in this scope
4 | cin>>a>>b;
| ^
a.cc:4:17: error: 'b' was not declared in this scope
4 | cin>>a>>b;
| ^
|
s731157308 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int A, B, x = A + B;
cin >> A >> B;
if(x <= 24) {
cout << x << endl;
}
else {
cout << x - 24 << ensl;
}
} | a.cc: In function 'int main()':
a.cc:12:23: error: 'ensl' was not declared in this scope
12 | cout << x - 24 << ensl;
| ^~~~
|
s453410672 | p03773 | C++ | #inculude<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >>a>>b;
if (a+b>=24){
cout << a+b-24 <<endl;
}
else{
cout << a+b <<endl;
}
} | a.cc:1:2: error: invalid preprocessing directive #inculude; did you mean #include?
1 | #inculude<bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header... |
s799050917 | 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())
| ^
|
s784463315 | 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())
| ^
|
s955197618 | p03773 | C++ | #include <bits/stdc++.h>
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:6:24: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
6 | cout << (A + B) / 24 < endl;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
from /us... |
s516930589 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B; cin >> A >> B;
cout << A + B < endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:17: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
6 | cout << A + B < endl;
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_... |
s305693034 | p03773 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <climits>
#include <bitset>
using namespace std;
typedef long double ld;
typedef long long int ll;
ty... | a.cc: In function 'int main()':
a.cc:49:17: error: expected ';' before 'endl'
49 | cout << a+b-24 endl;;
| ^~~~~
| ;
|
s357221713 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;cin>>a>>b;
if(a+b>=24)cout24-a-b;
else cout<<a+b;
} | a.cc: In function 'int main()':
a.cc:5:14: error: 'cout24' was not declared in this scope
5 | if(a+b>=24)cout24-a-b;
| ^~~~~~
|
s868370569 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin << A << B;
if(A+B>=24){
cout >> A+B-24 >> endl;
}else{
cout >> A+B >> endl;
}
} | a.cc: In function 'int main()':
a.cc:5:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
5 | cin << A << B;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:5:7: note: candidate: 'o... |
s069405505 | p03773 | C++ | using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace AtCoder
{
class Program
{
static void Main()
{
var A = ReadIntArray();
if (A[0] + A[1] <= 24)
{
Console.WriteLine(A[0] + ... | 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... |
s008630968 | p03773 | C++ | import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int start = a+b;
if(start > 24){
start -= 24;
}
System.out.println(start);
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s719813460 | p03773 | C++ | include<iostream>
using namespace std;
int a, b;
int main(){
cin >> a >> b;
if(a + b >= 24)
cout << a + b - 24 << endl;
else
cout << a + b << 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:5:3: error: 'cin' was not declared in this scope
5 | cin >> a >> b;
| ^~~
a.cc:7:5: error: 'cout' was not declared in this scope
7 | cout << a + b - 24 << endl;
| ... |
s577244927 | p03773 | C++ | m_os << std::chrono::duration_cast<Duration>((m_end - m_begin)).count() << duration_name_v<Duration> << '\n'; | a.cc:1:1: error: 'm_os' does not name a type
1 | m_os << std::chrono::duration_cast<Duration>((m_end - m_begin)).count() << duration_name_v<Duration> << '\n';
| ^~~~
|
s441041339 | p03773 | C++ | #include<uostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>=24?a+b-24:a+b)<<endl;
return 0;
} | a.cc:1:9: fatal error: uostream: No such file or directory
1 | #include<uostream>
| ^~~~~~~~~~
compilation terminated.
|
s523797946 | p03773 | C++ | #include <iostream>
#include <vector>
int main(void){
int a,b;
std::cin >> a >> b;
std:::cout << a+b%24;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:10: error: expected unqualified-id before ':' token
7 | std:::cout << a+b%24;
| ^
|
s874793134 | p03773 | C++ | #include<bits/stdc++.h>
using namesoace 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:2:7: error: expected nested-name-specifier before 'namesoace'
2 | using namesoace std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> A >> B;
| ^~~
| std::cin
In file included from /usr/inc... |
s674516343 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int A,B;
cin>>A>>B;
time=A+B;
if(time<=24)
time-=24;
cout<<<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: assignment of function 'time_t time(time_t*)'
7 | time=A+B;
| ~~~~^~~~
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if(time<=24)
| ~~~~^~~~
a.cc:9:13: warning: pointer to a function use... |
s388373027 | p03773 | C++ | //template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
//long longのシフト演算には気をつけよう
int main(){
int a, b; cin >> a >> b;
cout << (a+b)%24 << endl;
} | a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope
6 | int a, b; cin >> a >> b;
| ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
8 | cout << (a+b)%24 << endl;
| ^~~~
a.cc:8:25: error: 'endl' was not declared in this scope
... |
s840120994 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A, B;
cin >> A >> B;
int ans == (A + B) % 24;
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:9:11: error: expected initializer before '==' token
9 | int ans == (A + B) % 24;
| ^~
a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
11 | cout << ans << endl;
| ^~~
| abs
|
s256423007 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
if(a+b < 24){
cout << a+b << endl;
}
else{
cout << a+b-24 << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:10: error: no match for 'operator<' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
7 | if(a+b < 24){
| ~~~ ^ ~~
| | |
| | int
| std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/r... |
s560445925 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;
}
} | a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s436786497 | p03773 | C++ | 1
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
|
s190305679 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *(argv[])
{
int a,b;
cin >> a >> b;
cout << (a + b) % 24 << endl;
return 0;
} | a.cc:4:40: error: expected ')' before '{' token
4 | int main(int argc, char const *(argv[])
| ~ ^
| )
5 | {
| ~
|
s018194459 | p03773 | C++ | 062C
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <math.h>
#include <deque>
using ll = long long;
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b)%24 << endl;
return 0;
}
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 062C
| ^~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
... |
s051558076 | p03773 | C++ | #include <bits/stdc++.h>
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: In function 'int main()':
a.cc:7:12: error: 'B' was not declared in this scope
7 | if ((a + B) < 24) {
| ^
|
s090666395 | p03773 | C | #include <stdio.h>
int main(void){
int A,B,c;
scanf("%d %d",&a,&b);
c=a+b;
if(a+b>24){c=a+b-24;}
printf("%d",c);
return 0;
} | main.c: In function 'main':
main.c:4:18: error: 'a' undeclared (first use in this function)
4 | scanf("%d %d",&a,&b);
| ^
main.c:4:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:21: error: 'b' undeclared (first use in this function)
4... |
s101284309 | 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+1;++i){
for(int j=0;j<=i;++j){
if(j==0||j==i){
C[i][j]=1;
}
else{
C[i][j]=C[i-1][j-1]+C[i-1][j];
}... | a.cc: In function 'int main()':
a.cc:21:1: error: 'cin' was not declared in this scope
21 | cin>> N>>A>>B;
| ^~~
a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'short'?
28 | sort(v,v+N);
| ^~~~
| short
a.cc:29:5: error: 'reverse' was not declared in this scope
... |
s926182281 | p03773 | C++ | #include <iostrean>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b)%24;
} | a.cc:1:10: fatal error: iostrean: No such file or directory
1 | #include <iostrean>
| ^~~~~~~~~~
compilation terminated.
|
s449154475 | p03773 | C | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:11: erro... |
s186063729 | p03773 | C | #include <stdio.h>
int main()
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d", (a + b) % 24)
} | main.c: In function 'main':
main.c:7:35: error: expected ';' before '}' token
7 | printf("%d", (a + b) % 24)
| ^
| ;
8 | }
| ~
|
s797829466 | p03773 | C | #include <stdio.h>int main(){int a,b;scanf("%d%d",&a,&b);printf("%d",(a+b)%24);return 0;}
| main.c:1:19: warning: extra tokens at end of #include directive
1 | #include <stdio.h>int main(){int a,b;scanf("%d%d",&a,&b);printf("%d",(a+b)%24);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 r... |
s308693518 | p03773 | C++ | #include <iostream>
int main(){
int a,b;
cin>>a>>b;
if(a+b<24)cout<<a+b;
else cout<<a+b-24;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | 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... |
s037936781 | p03773 | C++ | #include <iostream>
using namespace std;
int main() {
int A, B, res;
cin >> A >> B;
res = A+B
if (res >= 24) cout << res - 24;
else cout << res;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'if'
8 | res = A+B
| ^
| ;
9 | if (res >= 24) cout << res - 24;
| ~~
a.cc:10:3: error: 'else' without a previous 'if'
10 | else cout << res;
| ^~~~
|
s221434837 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;}
} | a.cc:8:1: error: expected declaration before '}' token
8 | }
| ^
|
s389645785 | p03773 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
int main(){
int a, b;
std::cin>>a>>b;
int res;
if(a + b < 24){
res = a + b;
}else(a + b <= 48){
res = a + b - 24;
}
std::cou... | a.cc: In function 'int main()':
a.cc:17:23: error: expected ';' before '{' token
17 | }else(a + b <= 48){
| ^
| ;
|
s096157073 | p03773 | C++ | int main(){
int a,b,t;
scanf("%a %b",&a,&b);
t = a + b;
if(t>=24){
t = t-24;
printf("%d\n",t);
}
else{
printf("%d\n",t);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
3 | scanf("%a %b",&a,&b);
| ^~~~~
a.cc:7:17: error: 'printf' was not declared in this scope
7 | printf("%d\n",t);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in he... |
s672879358 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >>a>>b;
cout << (a+b)%24 << endl; | a.cc: In function 'int main()':
a.cc:7:28: error: expected '}' at end of input
7 | cout << (a+b)%24 << endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s468978052 | p03773 | C++ | #include <stdio.h>
#include <stdlib.h>
void main()
{
int A, B,c,d,e;
scanf("%d%d", &A, &B);
c = A + B;
d = c - 24;
e = 0;
if (c <24)
{
printf("%d\n", c);
}
else
{
if (c == 48)
{
printf("%d\n",e);
}
else printf("%d\n", d);
}
system("pause");
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main()
| ^~~~
|
s856806589 | p03773 | C | include<stdio.h>
int main(void) {
int start;
int now;
int remain;
scanf("%d%d", &now, &remain);
start = now + remain;
if (start >= 24) {
start = start-24;
}
printf("%d", start);
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s185241158 | p03773 | C | include<stdio.h>
int main(void) {
int start;
int now;
int remain;
scanf("%d%d", &now, &remain);
start = now + remain;
if (start>=24) {
start = start-24;
}
printf("%d", start);
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s216485947 | p03773 | C | include <stdio.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
printf("%d",(a+b)%24+24*(a+b==24));
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s327774653 | p03773 | C | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:11:... |
s078106771 | p03773 | C | #include<stdio.h>>
int main(){
int A, B, C;
scanf("%d %d", &A, &B);
C = A + B;
if(C >= 0 && C <= 23){
printf("%d", C);
}
else if(C >= 0 && C >= 23){
C = C - 24;
printf("%d", C);
}
return 0; | main.c:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>>
| ^
main.c: In function 'main':
main.c:19:5: error: expected declaration or statement at end of input
19 | return 0;
| ^~~~~~
|
s357611233 | p03773 | C++ | #include<stdio.h>>
int main(){
int A, B, C;
scanf("%d %d", &A, &B);
C = A + B;
if(C >= 0 && C <= 23){
printf("%d", C);
}
else if(C >= 0 && C >= 23){
C = C - 24;
printf("%d", C);
}
return 0; | a.cc:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>>
| ^
a.cc: In function 'int main()':
a.cc:19:14: error: expected '}' at end of input
19 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s979038511 | p03773 | C | include<stdio.h>>
int main(){
int A, B, C;
scanf("%d %d", &A, &B);
C = A + B;
if(C >= 0 && C <= 23){
printf("%d", C);
}
else if(C >= 0 && C >= 23){
C = C - 24;
printf("%d", C);
}
return 0;
}
| main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>>
| ^
|
s615753729 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i,j,k,x,y,ans=0,curr;
scanf("%d %d",&n,&k);
int ans = n+k;
if(ans > 24)
printf("%d\n",ans-24);
else
printf("%d\n",ans);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:13: error: redeclaration of 'int ans'
7 | int ans = n+k;
| ^~~
a.cc:5:21: note: 'int ans' previously declared here
5 | int n,i,j,k,x,y,ans=0,curr;
| ^~~
|
s890530198 | p03773 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = SC.nextInt();
int b = sc.nextInt();
int ans = a+b;
if(ans>=24) ans -= 24;
System.out.println(ans);
}
}
| Main.java:6: error: cannot find symbol
int a = SC.nextInt();
^
symbol: variable SC
location: class Main
1 error
|
s409797803 | 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
|
s775949846 | p03773 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int n,m;
int sum;
scanf("%d%d",&n,&m);
sum=m+n;
sum%=24;
printf("%d ",sum);
}
} | a.cc:16:1: error: expected declaration before '}' token
16 | }
| ^
|
s220454488 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a+b<24)
{
cout<<a+b;
}
else
{
cout<<a+b-24
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:29: error: expected ';' before '}' token
13 | cout<<a+b-24
| ^
| ;
14 | }
| ~
|
s783906647 | p03773 | C++ | #include <iostream>
int main(){
int a,b;
cin >> a >> b;
if(a+b >= 24) cout << a+b-24 << endl;
else cout << a+b << endl;
}
| a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | 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; ///< Li... |
s311995300 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
while(A+B>=24){
A+B -= 24;
}
cout << A+B << endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: lvalue required as left operand of assignment
8 | A+B -= 24;
| ~^~
|
s298657795 | p03773 | C++ | #include <iostream>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
while(A+B>=24){
A+B -= 24;
}
cout << A+B << endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: lvalue required as left operand of assignment
8 | A+B -= 24;
| ~^~
|
s708497781 | p03773 | C++ | #include <iostream>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
while(A+B>=24){
A+B = A+B-24;
}
cout << A+B << endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: lvalue required as left operand of assignment
8 | A+B = A+B-24;
| ~^~
|
s060038999 | p03773 | C++ | #include <iostream>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
while(A+B>=24){
A+B -=24;
}
cout << A+B << endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: lvalue required as left operand of assignment
8 | A+B -=24;
| ~^~
|
s618270562 | p03773 | Java | import java.util.Scanner;
public class A57Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
System.out.println(A + B);
}
} | Main.java:3: error: class A57Main is public, should be declared in a file named A57Main.java
public class A57Main {
^
1 error
|
s734693050 | p03773 | C++ | #include<iostream>
typedef long long ll;
using namespace std;
}
int main(){
ll N;
cin>>N;
ll X=0;
ll digit = 0;
for(ll i=1; i<=sqrt(N); ++i){
if(N%i==0)
X=N/i;}
while(X!=0){
X=X/10;
++digit;}
cout<<digit<<endl;
}
| a.cc:6:6: error: extended character is not valid in an identifier
6 | ll N;
| ^
a.cc:4:1: error: expected declaration before '}' token
4 | }
| ^
a.cc: In function 'int main()':
a.cc:6:6: error: '\U00003000' was not declared in this scope
6 | ll N;
| ^~
a.cc:10:18: error: 'sqr... |
s659011023 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
int ans=(A+B);
if(ans>=24)ans-=42;
cout<<ans<<endl;
return 0;
}
}
| a.cc:11:1: error: expected declaration before '}' token
11 | }
| ^
|
s907353498 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c,d= 0;
cin >> a >> b;
c=a+b;
if(c >24){
c = c-24
}
cout << c << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
11 | c = c-24
| ^
| ;
12 | }
| ~
|
s360271412 | p03773 | C++ | import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.array;
import std.range;
void main(){
auto Q=readln.split.to!(int[]),A=Q[0],B=Q[1];
if(A+B>24)writeln((A+B)-24);
else writeln(A+B);
} | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
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 std.string;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: e... |
s821700800 | p03773 | C++ | #include <iostream>
using namespace std;
int main() {
int a=0,b=0,y=0;
cin >> a;
cin >> b;
if(a<0){
exit(0);
}
if(b>23){
exit(0);
}
y=a+b;
if(y>24){
y=y-24;
}
if(y==24){
y=0;
} | a.cc: In function 'int main()':
a.cc:21:10: error: expected '}' at end of input
21 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s320461298 | p03773 | C++ | #include <iostream>
using namespace std;
int main() {
int A;
int B;
cin >> A;
cin >> B;
int t;
t = A + B;
if(t > 23){
t = t - 24
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
12 | t = t - 24
| ^
| ;
13 | }
| ~
|
s987598472 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout >> (A+B)%24;
} | a.cc: In function 'int main()':
a.cc:11:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
11 | cout >> (A+B)%24;
| ~~~~ ^~ ~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<c... |
s067036585 | p03773 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=1;i<=n;++i)
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
using namespace std;
int main(){
string a,b;
cin >> a >> b;
cout << (a+b)%24 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:16: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
10 | cout << (a+b)%24 << endl;
| ~~~~~^~~
| | |
| | int
| std::__cxx11::basic_string<char>
In file i... |
s442946532 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
if(A+B>=24) cout << A+B-24 << endl;
else cout << A+B < endl;
} | a.cc: In function 'int main()':
a.cc:7:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
7 | else cout << A+B < endl;
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:48,
from /usr/i... |
s810430980 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
if(A+B>=24) cout << A+B-24 << endl;
else cout << A+B < endl;
} | a.cc: In function 'int main()':
a.cc:7:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
7 | else cout << A+B < endl;
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:48,
from /usr/i... |
s455881770 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
if(A+B>=24) cout << A+B-24 << endl;
else cout << A+B < endl;
} | a.cc: In function 'int main()':
a.cc:6:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
6 | else cout << A+B < endl;
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:48,
from /usr/i... |
s644978502 | p03773 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<ll, int> P;
#define MOD (1000000007ll)
#define l_ength size
ll sq(ll x){
return x*x;
}
void mul_mod(ll& a, ll b){
a *= b;
a %= MOD;
}
bool isvowel(char c){
int i;
string v="aeiou";
for(i... | a.cc: In function 'int main()':
a.cc:32:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
32 | cout >> a >> b;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<... |
s727949960 | p03773 | C++ | #include<stdio.h>
int main(void)
{
char str[24];
char str2[24];
fgets(str,24,stdin);
int sum=str+str2;
printf("%d\n",sum);
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:12: error: invalid operands of types 'char [24]' and 'char [24]' to binary 'operator+'
7 | int sum=str+str2;
| ~~~^~~~~
| | |
| | char [24]
| char [24]
|
s997538257 | p03773 | C++ | #include<stdio.h>
int main(void)
{
char str[24];
char str2[24];
int sum=str+str2;
printf("%d\n",sum);
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:12: error: invalid operands of types 'char [24]' and 'char [24]' to binary 'operator+'
6 | int sum=str+str2;
| ~~~^~~~~
| | |
| | char [24]
| char [24]
|
s318415390 | p03773 | C++ | #include<stdio.h>
int main(void)
{
char str[10];
char str2[10];
int sum=str+str2;
printf("%d\n",sum);
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:12: error: invalid operands of types 'char [10]' and 'char [10]' to binary 'operator+'
6 | int sum=str+str2;
| ~~~^~~~~
| | |
| | char [10]
| char [10]
|
s872261836 | p03773 | C++ | #include<stdio.h>
int main()
{
char str[10];
char str2[10];
int sum=str+str2;
printf("%d\n",sum);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:12: error: invalid operands of types 'char [10]' and 'char [10]' to binary 'operator+'
6 | int sum=str+str2;
| ~~~^~~~~
| | |
| | char [10]
| char [10]
|
s807793556 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A;
cin>>b;
if(A+B>24){
cout<<A+B-24<<endl;
}
else{
cout<<A+B<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'b' was not declared in this scope
9 | cin>>b;
| ^
|
s086069111 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>b;
if(A+B>24){
cout<<A+B-24<<endl;
}
else{
cout<<A+B<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:11: error: 'b' was not declared in this scope
8 | cin>>A>>b;
| ^
|
s749897702 | p03773 | C++ | #include<iostream>
using namespace std;
int main()
{
int A,B,i;
cin>>A>>B;
i=A+B;
if(i<=)
{
cout<<i<<endl;
}else{
cout<<i-24<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before ')' token
8 | if(i<=)
| ^
|
s877887111 | p03773 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#inlcude<alg0;orithm>
using namespace std;
int main()
{int a,b;cin>>a>>b;cout<<(a+b)%24;
return 0;} | a.cc:4:2: error: invalid preprocessing directive #inlcude; did you mean #include?
4 | #inlcude<alg0;orithm>
| ^~~~~~~
| include
|
s934368538 | p03773 | C++ | use std::io;
fn next_vec() -> Vec<i64> {
let mut buf = String::new();
io::stdin().read_line(&mut buf).unwrap();
buf.split_whitespace().map(|n| n.parse().unwrap()).collect()
}
fn main() {
let v = next_vec();
let a = v[0];
let b = v[1];
println!("{:?}", (a + b) % 24);
}
| a.cc:1:1: error: 'use' does not name a type
1 | use std::io;
| ^~~
a.cc:3:1: error: 'fn' does not name a type
3 | fn next_vec() -> Vec<i64> {
| ^~
a.cc:9:1: error: 'fn' does not name a type
9 | fn main() {
| ^~
|
s366939736 | p03773 | Java | import java.util.Scanner;
public class TimeZone {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
System.out.println((a + b) % 24);
}
}
| Main.java:3: error: class TimeZone is public, should be declared in a file named TimeZone.java
public class TimeZone {
^
1 error
|
s518091171 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int a,b;
cin>>a>>b;
ans=a+b;
if(ans>23)ans-=24;
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
7 | ans=a+b;
| ^~~
| abs
|
s996945475 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
int n = a+b;
if(n=>24) n -= 24;
cout << n;
} | a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before '>' token
8 | if(n=>24) n -= 24;
| ^
|
s446264748 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
n = a+b;
if(n>24) n -= 24;
cout << n;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'n' was not declared in this scope
7 | n = a+b;
| ^
|
s678244348 | p03773 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(... | a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before ')' token
17 | cout << a+b)%24 << endl;
| ^
| ;
|
s723408888 | p03773 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(... | a.cc: In function 'int main()':
a.cc:17:13: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
17 | puts((a+b)%24);
| ~~~~~^~~
| |
| int
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conve... |
s412084148 | p03773 | C++ | include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b;
c=a+b;
if(c%24==0){
cout << c << endl;
}else{
c=c-24;
cout << c << 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:8:1: error: 'cin' was not declared in this scope
8 | cin >> a >> b;
| ^~~
a.cc:13:3: error: 'cout' was not declared in this scope
13 | cout << c << endl;
| ^~~~
a.cc:13:... |
s548831929 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b;
c=a+b;
if(c%24!>=0){
c=c-24;
}
cout << c << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:8: error: expected ')' before '!' token
12 | if(c%24!>=0){
| ~ ^
| )
|
s984614544 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b;
c=a+b;
if((c%24)!>=0){
c=c-24;
}
cout << c << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:10: error: expected ')' before '!' token
12 | if((c%24)!>=0){
| ~ ^
| )
|
s594373751 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b;
c=a+b;
if(c%24!=0){
c=c-24;
}else if{
c=c-48;
}
cout << c << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:11: error: expected '(' before '{' token
14 | }else if{
| ^
| (
|
s113518539 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b;
c=a+b;
if(c%24!=0){
c=c-24;
}
cout << c < endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:11: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
16 | cout << c < endl;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/lo... |
s220327002 | p03773 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b;
c=a+b;
if(c%24=!0){
c=c-24;
}
cout << c <, endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:5: error: lvalue required as left operand of assignment
12 | if(c%24=!0){
| ~^~~
a.cc:16:12: error: expected primary-expression before ',' token
16 | cout << c <, endl;
| ^
|
s457518491 | p03773 | C++ | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Program {
class MainClass {
////////////////////////////////////////////////////////////
int N, A, B;
... | a.cc:47:10: error: invalid preprocessing directive #region
47 | #region MockMacro
| ^~~~~~
a.cc:51:10: error: invalid preprocessing directive #endregion
51 | #endregion
| ^~~~~~~~~
a.cc:54:6: error: invalid preprocessing directive #region
54 | #region default
... |
s419817737 | p03773 | C | #include <stdio.h>
int main(){
int A,B;
scanf("%d", &A);
scanf( "%d", &B);
int x = A+B;
if(x <= 24){
printf("%d",x);
}else if(24 <= x){
printf("%d",x-24));
}
return 0;
} | main.c: In function 'main':
main.c:10:34: error: expected ';' before ')' token
10 | printf("%d",x-24));
| ^
| ;
main.c:10:34: error: expected statement before ')' token
|
s540651523 | p03773 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.print("開始時刻");
int A = scan.nextInt();
System.out.print("経過時間");
int B = scan.nextInt();
scan.close();
if((A + B) >= 0 && (A + B) <= 23 ){
System.out.println(... | Main.java:16: error: ')' expected
else if((A + B) < 0 (A + B) >= 24){
^
Main.java:16: error: not a statement
else if((A + B) < 0 (A + B) >= 24){
^
Main.java:16: error: ';' expected
else if((A + B) < 0 (A + B) >= 24){
^
3 e... |
s294873721 | p03773 | C++ | #include <stdio.h>
int
main()
{
int i;
i=1 + 1;
printf("%d\n", i) | a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' at end of input
9 | printf("%d\n", i)
| ^
| ;
a.cc:9:21: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s640486575 | p03773 | Java | import java.util.Scanner;
Scanner scan = new Scanner(System.in);
System.out.print("開始時刻");
float a = scan.nextFloat();
System.out.print("経過時間");
float b = scan.nextFloat();
scan.close();
System.out.println("終了時間は" + (a + b) + "時です");
| Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
Scanner scan = new Scanner(System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
System.out.print("????");
^
Main.java:6: error: class, interface, enum... |
s789209743 | p03773 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
int a,b;
Scanner s = new Scanner(System.in);
a = s.next();
b = s.next();
System.out.println((a + b) % 24);
}
} | Main.java:7: error: incompatible types: String cannot be converted to int
a = s.next();
^
Main.java:8: error: incompatible types: String cannot be converted to int
b = s.next();
^
2 errors
|
s635664954 | p03773 | Java | public class Main {
public static void main(String[] args) {
int a,b;
Scanner s = new Scanner(System.in);
a = s.next();
b = s.next();
System.out.println((a + b) % 24);
}
} | Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s328168564 | p03773 | Java | public class Main {
public static void main(String[] args) {
int a,b;
Scanner s = new Scanner(System.in);
a = s.next();
b = s.next();
System.out.println((a + b) 5 24);
}
} | Main.java:7: error: ')' or ',' expected
System.out.println((a + b) 5 24);
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.