submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s521910897
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:10: error: 'a' was not declared in this scope 7 | cout<<(a+b)%24<<endl; | ^ a.cc:7:12: error: 'b' was not declared in this scope 7 | cout<<(a+b)%24<<endl; | ^
s555294342
p03773
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; prt((a+b)%24); }
a.cc: In function 'int main()': a.cc:8:3: error: 'prt' was not declared in this scope 8 | prt((a+b)%24); | ^~~
s743122556
p03773
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int A, B; cin >> A >> B; int ans = A + B; if(ans < 24) { cout << ans << endl; } if(ans > 24) { int ans1 = ans - 24; cout << ans1 << endl; } if(ans = 24) int ans2 = 0; ...
a.cc: In function 'int main()': a.cc:19:13: error: 'ans2' was not declared in this scope; did you mean 'ans'? 19 | cout << ans2 << endl; | ^~~~ | ans
s155865178
p03773
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int A, B; cin >> A >> B; int ans = A + B - 24 cout << ans << endl; }
a.cc: In function 'int main()': a.cc:12:2: error: expected ',' or ';' before 'cout' 12 | cout << ans << endl; | ^~~~
s076370483
p03773
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int A, B; cin >> A >> B; int ans = A + B - 12 cout << ans << endl; }
a.cc: In function 'int main()': a.cc:13:2: error: expected ',' or ';' before 'cout' 13 | cout << ans << endl; | ^~~~
s996816307
p03773
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int A, B; cin >> A >> B; int ans = A + B + 12 cout << ans << endl; }
a.cc: In function 'int main()': a.cc:13:2: error: expected ',' or ';' before 'cout' 13 | cout << ans << endl; | ^~~~
s683180318
p03773
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <algorithm> #define rep(i,n) for(int i=0;i<(n);++i) #define all(a) (a).begin(),(a).end() using namespace std; using Graph = vector<vector<int>>; typedef long long ll; const int mod= 1e+9+7; int main(){ int a,b; cin>>a>>b; if(a+b>=24){ cout<<a+b...
a.cc: In function 'int main()': a.cc:16:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 16 | else cout<a+b<<endl; | ~~~^~~~~~
s053577182
p03773
C++
//بِسْمِ ٱللَّٰهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl "\n" int main() { int a,b; cin >> a >> b; if ((a+b)<2= 24) cout << a+b << endl; else cout << (a+b)-24 << endl; return 0;...
a.cc: In function 'int main()': a.cc:16:14: error: lvalue required as left operand of assignment 16 | if ((a+b)<2= 24) | ~~~~~^~
s082083868
p03773
C++
//بِسْمِ ٱللَّٰهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl "\n" int main() { int a,b; cin >> a >> b; if ((a+b)<2= 24) cout << a+b << endl; else cout << (a+b)-24 << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:14: error: lvalue required as left operand of assignment 16 | if ((a+b)<2= 24) | ~~~~~^~
s588981015
p03773
C++
#include<bits/stdc++.h> using namespace std; int a[55],b[55],c[55],d[55],tc[55]; int main(){ int n,m,f=0; pair<int,int> min; min.first=10^8; min.second=1; 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++){ min.first=100000000; //cout<<"MIN:"...
a.cc:36:3: error: stray '#' in program 36 | } #include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:7:21: warning: result of '10^8' is 2; did you mean '1e8'? [-Wxor-used-as-pow] 7 | min.first=10^8; | ^ | --- | 1e...
s322389332
p03773
C++
#include <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: In function 'int main()': a.cc:8:10: error: 'B' was not declared in this scope 8 | if(a+B>24) cout << a+b-24 << endl; | ^
s516077015
p03773
C++
a,b = gets.split.map(&:to_i); puts (a+b)%24
a.cc:1:1: error: 'a' does not name a type 1 | a,b = gets.split.map(&:to_i); puts (a+b)%24 | ^ a.cc:1:36: error: expected constructor, destructor, or type conversion before '(' token 1 | a,b = gets.split.map(&:to_i); puts (a+b)%24 | ^
s149224864
p03773
C
#include<stdio.h> int main(void) { 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: In function 'main': main.c:9:23: error: stray '\343' in program 9 | else printf("%d<U+00A5>n"<U+3001>A+B); | ^~~~~~~~ main.c:9:23: error: expected ')' before 'A' 9 | else printf("%d¥n"、A+B); | ~ ^ ~ | )
s337512980
p03773
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { string A,B;cin>>A>>B; cout << (A+B)%24 << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 8 | cout << (A+B)%24 << endl; | ~~~~~^~~ | | | | | int | std::__cxx11::basic_string<char> In file in...
s212847534
p03773
C++
#include <bits/stdc++.h> #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define DEC(i, a, b) for (int i = (a); i > (b); --i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define pb push_back #define ALL(obj) (obj).begin(), (obj).end() #define debug(x) cerr << #x << ": " << x << '\n' using...
a.cc: In function 'int main()': a.cc:22:15: error: cannot convert 'std::__cxx11::basic_string<char>' to 'long long int' in initialization 22 | int sum = a + b; | ~~^~~ | | | std::__cxx11::basic_string<char>
s813882047
p03773
C++
#include <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: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s079765177
p03773
C++
#include <iostream> using namespace std; void ABC50(void); void ABC52(void); void ABC53(void); void ABC54(void); void ABC55(void); void ABC56(void); void ABC57(void); void ABC58(void); void ABC59(void); int main(void){ ABC57(); return 0; } void ABC57(void){ int a,b; cin>>a>>b; if(a+b<24)cout<<a+B<...
a.cc: In function 'void ABC57()': a.cc:21:23: error: 'B' was not declared in this scope 21 | if(a+b<24)cout<<a+B<<endl; | ^
s744145269
p03773
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long i=0;i<(long long)(n);i++) #define REP(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() #define eb emplace_back #define lb(v,k) (lower_bound(all(v),k)-v.begin()) #define ub(v,k) (uppe...
a.cc: In function 'void solve()': a.cc:41:15: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 41 | cin>>a>b; | ~~~~~~^~ | | | | | int | std::basic_ist...
s575032172
p03773
C++
using System; class Program{ public static void Main(){ var input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int ans = a + b; if(ans >= 24) ans -= 24; Console.WriteLine(ans); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:4:9: error: expected ':' before 'static' 4 | public static void Main(){ | ^~~~~~~ | : a.cc:15:2: error: expected ';' after class definition 15 | } | ^ | ; a....
s762136325
p03773
C++
using System; class Program{ public static void Main(){ var input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int ans = a + b; if(ans >= 24) ans -= 24; Console.WriteLine(ans); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:4:9: error: expected ':' before 'static' 4 | public static void Main(){ | ^~~~~~~ | : a.cc:15:2: error: expected ';' after class definition 15 | } | ^ | ; a....
s383089071
p03773
C++
#include <bits/stdc++.h> 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; } }#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; if (a+b < 23){ cout << a+b ...
a.cc:12:2: error: stray '#' in program 12 | }#include <bits/stdc++.h> | ^ a.cc:12:3: error: 'include' does not name a type 12 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:15:5: error: redefinition of 'int main()' 15 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined her...
s505717876
p03773
C++
A, B = map(int, input().split()) T = A+B if (T <= 24): print(T) else: print(T-24)
a.cc:1:1: error: 'A' does not name a type 1 | A, B = map(int, input().split()) | ^
s609349028
p03773
C++
#include <bits/stdc++.h> #define rep(i,n) for(ll i=0;i<(n);++i) #define all(a) (a).begin(),(a).end() #define dunk(a) cout << (a) << endl #define rall(a) (a).rbegin(),(a).rend() const int INF = 2e9; using namespace std; using Graph = vector<vector<int>>; typedef pair<int,int> P; typedef long long ll; int main(){ in...
a.cc:16:2: error: stray '#' in program 16 | }#include <bits/stdc++.h> | ^ a.cc:16:3: error: 'include' does not name a type 16 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:27:5: error: redefinition of 'int main()' 27 | int main(){ | ^~~~ a.cc:12:5: note: 'int main()' previously defined he...
s761050262
p03773
C++
#include<bits\stdc++.h> using namespace std; #define ll long long int int main(){ int a,b; cin>>a>>b; int sum=a+b; cout<<sum%24; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s375837161
p03773
C++
int main() { int A, B,M; cin >> A >> B; M = A + B; if (A <= 23 && B <= 23) { if (M <= 24) cout << M; else cout << M - 24; } else return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin >> A >> B; | ^~~ a.cc:10:25: error: 'cout' was not declared in this scope 10 | cout << M; | ^~~~ a.cc:12:25: error: 'cout' was not declared in ...
s062578770
p03773
C++
#include<iostream> using namesapce 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:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:3: 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...
s243321216
p03773
C++
#inlcude<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)%24<<endl;}
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:3: error: 'cin' was not declared in this scope 5 | cin>>a>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostre...
s602762213
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()) | ^
s038640208
p03773
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int factor(int n) { int ret=1; for(int i = n; i > 1; i++) ret *= i; return ret; } int main() { int N,A,B; cin >> N >> A >> B; vector<int> vec(8); for(int i = 0; i < N; i++) { cin >> vec[i]; } sort(vec.begin(), vec...
a.cc: In function 'int main()': a.cc:37:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'float') 37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl; | ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ | | | | | ...
s923677795
p03773
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int factor(int n) { int ret=1; for(int i = n; i > 1; i++) ret *= i; return ret; } int main() { int N,A,B; cin >> N >> A >> B; vector<int> vec(8); for(int i = 0; i < N; i++) { cin >> vec[i]; } sort(vec.begin(), vec...
a.cc: In function 'int main()': a.cc:37:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'float') 37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl; | ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ | | | | | ...
s383981641
p03773
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int factor(int n) { int ret=1; for(int i = n; i > 1; i++) ret *= i; return ret; } int main() { int N,A,B; cin >> N >> A >> B; vector<int> vec = new vector<int>(N); for(int i = 0; i < N; i++) { cin >> vec[i]; } sor...
a.cc: In function 'int main()': a.cc:15:21: error: conversion from 'std::vector<int>*' to non-scalar type 'std::vector<int>' requested 15 | vector<int> vec = new vector<int>(N); | ^~~~~~~~~~~~~~~~~~
s377427648
p03773
C
#include <stdio.h> int main(void){ int a,b; scanf("%d%d",&a,&b); if(a+b<24){ printf("%d",a+b); }else{ printf("%d",a+b-24); return 0; }
main.c: In function 'main': main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s738903458
p03773
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll A,B; cin >> A >> B; if(A+B==24){ cout << 0 << endl; } else if(A+B>=24){ cout << A+b-24 << endl; } else{ cout << A+B << endl; } }
a.cc: In function 'int main()': a.cc:13:17: error: 'b' was not declared in this scope 13 | cout << A+b-24 << endl; | ^
s627813981
p03773
C++
#include<bits/stddc++.h> using namespace std; int main() { int a,b; cin>>a>>b; cout<<(a+b)%24<<endl; return 0; }
a.cc:1:9: fatal error: bits/stddc++.h: No such file or directory 1 | #include<bits/stddc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s153198874
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.out.println((a+b)%24); sc.close(); } }
Main.java:3: error: '{' expected public class Main ^ Main.java:5: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) Main.java:12: error: class, interface, enum, or recor...
s897308369
p03773
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder.Abc { public class QuestionA { public static void Main(string[] args) { // 整数配列の入力 var inputLongArray = Console.ReadLine().Split(' ').Sel...
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.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s013926315
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:7:26: error: 'Endl' was not declared in this scope 7 | cout<<(a+b)%24<<Endl; | ^~~~
s046690920
p03773
C
#include <bits/stdc++.h> #define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++) using namespace std; //////全探索したいときに開けよ//////// vector<vector<int>> fspattern; vector<int> fspattern_draft; int fspcnt = 0; void setfspattern_core(int floor,int number,int degree){ if(floor==degree){ fspattern.at(fspcnt) = fspattern...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s633867755
p03773
Java
def coder(a,b): ans = 0 if a + b < 24: return a + b else: return a + b % 24 def main(): a , b = map(int, input().split()) print(coder(a , b)) if __name__ == '__main__': main()
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. def coder(a,b): ^ (use --enable-preview to enable unnamed classes) Main.java:1: error: <identifier> expected def coder(a,b): ^ Main.java:1: error: <identifier> expected def coder(a,b): ^ Main.java:1: error: ...
s756268799
p03773
C++
#include <iostream> #include <string> int main() { int a,b; std::cin>>a>>b; if(a+b>23){ cout >> a+b-23; }else{ std::cout << a+b; } }
a.cc: In function 'int main()': a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout >> a+b-23; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; /...
s281210996
p03773
C++
#include <iostream> #include <string> int main() { int a,b; std::cin>>a>>b; if(a+b>23){ std::cout >> a+b-23; }else{ std::cout << a+b; } }
a.cc: In function 'int main()': a.cc:8:15: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 8 | std::cout >> a+b-23; | ~~~~~~~~~ ^~ ~~~~~~ | | | | | int | std::ostream {aka std:...
s686636700
p03773
C++
#include <iostream> #include <string> int main() { int a,b; std::cin>>a>>b; if(a+b>23){ cout >> a+b-23; }else{ std::cout << a+b; } }
a.cc: In function 'int main()': a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout >> a+b-23; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; /...
s604417181
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; cout << (a+b)%24 << endl; }
a.cc: In function 'int main()': a.cc:8:22: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 8 | cout << (a+b)%24 << endl; | ~~~~~^~~ | | | | | int | std::__cxx11:...
s859112449
p03773
C
#include<stdio.h> int main() { int a, b,s; scanf("%d %d",&a,&b); s = a + b; if (s => 24) { s = s - 24; } printf("%d",s); }
main.c: In function 'main': main.c:10:16: error: expected expression before '>' token 10 | if (s => 24) { | ^
s893583357
p03773
C
#include<stdio.h> int main() { int a, b,s; scanf("%d %d",&a,&b); s = a + b; if (s > =24) { s = s - 24; } printf("%d",s); }
main.c: In function 'main': main.c:10:17: error: expected expression before '=' token 10 | if (s > =24) { | ^
s529742932
p03773
C
#include<stdio.h> int main() { int a, b,s; scanf_s("%d %d",&a,&b); s = a + b; if (a + b == 25) { s =1; } printf("%d",s); }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d %d",&a,&b); | ^~~~~~~ | scanf
s215249148
p03773
C++
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> P; const int d...
a.cc: In function 'int main()': a.cc:40:10: error: 'A' was not declared in this scope 40 | cin >> A >> B; | ^ a.cc:40:15: error: 'B' was not declared in this scope 40 | cin >> A >> B; | ^
s601069762
p03773
C++
#include<iostream> int main() { int a,b; cin>>a>>b; if(a+b>24) { a=a+b-24; cout<<a<<endl; } else { a=a+b; cout<<a<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | 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 st...
s649008853
p03773
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> #include <cctype> #include <ctype.h> #include <math.h> #define ll long long char toupper(char c); char toupper(char c) { return (c - 0x20); } using namespace std; int main() { int a...
a.cc: In function 'int main()': a.cc:23:8: error: 'B' was not declared in this scope 23 | if(a+B<=24) | ^
s746017687
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:4:12: error: expected unqualified-id before ';' token 4 | int a, b,; | ^
s994806707
p03773
C
#include<stdio.h> int main() { int A,B,c; 0<=A; B<=23; scanf("%d %d",&A,&B); c=A+B; if(c<=24) printf("%d",c); else(c>24) printf("%d",c-24); }
main.c: In function 'main': main.c:11:27: error: expected ';' before 'printf' 11 | else(c>24) | ^ | ; 12 | printf("%d",c-24); | ~~~~~~
s536647808
p03773
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <string> #include <algorithm> #include <iomanip> #include <cmath> using namespace std; #define DEBUG 0 #define REP(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair<int,int> pint; static const ll MOD = 1000000007; stat...
a.cc: In function 'int main()': a.cc:21:5: error: 'res' was not declared in this scope 21 | res = n + m; | ^~~
s275061914
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(); if (a+b >=24) { System.out.println(a+b-24); } else if () { } else { System.out.println(a+b); } } }
Main.java:12: error: illegal start of expression } else if () { ^ 1 error
s678165104
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:14: error: 'B' was not declared in this scope 7 | cout << (a+B)%24 << endl; | ^
s484566629
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { //input int a,b,; cin >> a >> b; if(a+b > 24){ cout << a+b-24; }else{ cout << a+b; } return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: expected unqualified-id before ';' token 6 | int a,b,; | ^
s255239075
p03773
C++
#include<iostream> using namespace std; int main(){ int A, B; cin >> A >> B; cout (A + B)% 24; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)' 9 | cout (A + B)% 24; | ~~~~~^~~~~~~
s412761276
p03773
C++
#include<iostream> using namespace stdg; int main(){ int a, b; cin >> a >> b; int ans; if(a+b >= 24){ ans = (a + b) % 24; } else{ ans = a + b; } cout << ans; return 0; }
a.cc:2:17: error: 'stdg' is not a namespace-name 2 | using namespace stdg; | ^~~~ a.cc: In function 'int main()': a.cc:5:3: 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...
s363360011
p03773
C++
#include<iostream> using namespace stdg; int main(){ int a, b; cin >> a >> b; int ans; if(a+b > 24){ ans = (a + b) % 24; } else{ ans = a + b; } cout << ans; return 0; }
a.cc:2:17: error: 'stdg' is not a namespace-name 2 | using namespace stdg; | ^~~~ a.cc: In function 'int main()': a.cc:5:3: 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...
s314020662
p03773
C
#include<stdio.h> int day(c) { if(c => 24){ c -= 24; return day(c); } else{ return c; } } int main() { int a; scanf("%d", &a); int b; scanf("%d", &b); int c; c = a + b; printf("%d\n", day(c)); return 0; }
main.c: In function 'day': main.c:3:5: error: type of 'c' defaults to 'int' [-Wimplicit-int] 3 | int day(c) | ^~~ main.c:5:11: error: expected expression before '>' token 5 | if(c => 24){ | ^
s672999144
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()) | ^
s352313620
p03773
C++
#include<bits/stdc++.h> #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <functional> #include <algorithm> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <cfloat> using namespace std; template<class T, class Compare = less<T...
In file included from /usr/include/c++/14/cassert:44, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106, from a.cc:1: a.cc: In function 'int main()': a.cc:66:43: error: invalid types 'llong {aka long long int}[llong {aka long long int}]' for array subscript 66 | ...
s754070050
p03773
C++
#include <vector> using namespace std; int main(){ int A, B; cin >> A >> B; cout << (A + B) % 24; }
a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope 7 | cin >> A >> B; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <vector> +++ |+#include <iostream> 2 | a.cc:8:3: err...
s111833758
p03773
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b; cin>>a>>b; cout<<(a+b)%24<<endl; }
a.cc: In function 'int main()': a.cc:6:16: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 6 | cout<<(a+b)%24<<endl; | ~~~~~^~~ | | | | | int | std::__cxx11::basic_string<char> In file incl...
s701978669
p03773
C++
a, b = map(int, input().split()) if a+b > 24: print(a+b-24) else: print(a+b)
a.cc:1:1: error: 'a' does not name a type 1 | a, b = map(int, input().split()) | ^
s769249889
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:8:13: error: no match for 'operator<' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 8 | if (A+B < 24){ | ~~~ ^ ~~ | | | | | int | std::__cxx11::basic_string<char> In file included from /usr/i...
s464015089
p03773
C++
#include<bits/stdc++.h> using namespace std;main(a){int b;cin>>a>>b;cout<<(a+b)%24<<endl;}
a.cc:2:25: error: expected constructor, destructor, or type conversion before '(' token 2 | using namespace std;main(a){int b;cin>>a>>b;cout<<(a+b)%24<<endl;} | ^
s157181648
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; int C = A + B if (C < 24) { cout << C << endl; } if (C >= 24) { cout << C - 24 << endl; } }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'if' 8 | if (C < 24) { | ^~
s327529557
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; return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: expected initializer before 'cin' 5 | cin >> a >> b; | ^~~ a.cc:6:10: error: 'b' was not declared in this scope 6 | if(a+b>=24) cout << a+b-24 << endl; | ^
s229910924
p03773
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdlib> #include<map> #include<iomanip> #include<sstream> #include<vector> #include<stack> #include<math.h> #include<queue> #include<complex> using namespace std; long long int solve(long long int n){ if(n==2){return 3;} else if(n==4||n==6||n==9||n==1...
a.cc: In function 'int main()': a.cc:28:15: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long long int') 28 | cin>>a<<b; | ~~~~~~^~~ | | | | | long long int | ...
s752135231
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:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)' 7 | cout (a + b) % 24 << endl; | ~~~~~^~~~~~~
s007514299
p03773
C++
#include<bits/stdc++.h> using namesapce std; int main(){ int x,y; cin>>x>>y; cout<<(x+y)%24; }
a.cc:3:7: error: expected nested-name-specifier before 'namesapce' 3 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | int x,y; cin>>x>>y; | ^~~ | std::cin In fil...
s489402310
p03773
C++
#include<biys/stdc++.h> using namesapce std; int main(){ int x,y; cin>>x>>y; cout<<(x+y)%24; }
a.cc:1:9: fatal error: biys/stdc++.h: No such file or directory 1 | #include<biys/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s310914036
p03773
C++
#include<biys/stdc++.h> using namesapce std; int main(){ ll x,y; cin>>x>>y; cout<<(x+y)%24; }
a.cc:1:9: fatal error: biys/stdc++.h: No such file or directory 1 | #include<biys/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s663375636
p03773
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; int ans=a+b; if(ans>24) ana=ans-24; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:5: error: 'ana' was not declared in this scope; did you mean 'ans'? 9 | ana=ans-24; | ^~~ | ans
s968041837
p03773
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; int ans = a + b; if(ans => 24) cout << ans - 24 << endl; else cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:11: error: expected primary-expression before '>' token 8 | if(ans => 24) cout << ans - 24 << endl; | ^
s741694641
p03773
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; int ans = a + b; if(a => 24) cout << ans - 24 << endl; else cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected primary-expression before '>' token 8 | if(a => 24) cout << ans - 24 << endl; | ^
s928163813
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:6:6: error: expected ';' before 'A' 6 | cin A >> B; | ^~ | ;
s548584814
p03773
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)%24<<endl;å }
a.cc: In function 'int main()': a.cc:10:26: error: '\U000000e5' was not declared in this scope 10 | cout<<(a+b)%24<<endl;å | ^
s894816295
p03773
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ int A,B; scanf("%d %d",&A,&B); if((B<=12)&&(A<24)) { int cnt=0; cnt=A+B; if(cnt>24) cnt-=24;} printf("%d",cnt); }
a.cc: In function 'int main()': a.cc:16:21: error: 'cnt' was not declared in this scope; did you mean 'int'? 16 | printf("%d",cnt); | ^~~ | int
s482122342
p03773
C++
#include <iostream> #include <stdio.h> using namespace std; int main(){ int A, B, R; scanf("%d%d", &A, &B); R=A+B; if(R>=23){ R=24-24-1+B; } printf("%d",R ); return 0; } #include <iostream> #include <stdio.h> using namespace std; int main(){ int A, B, R; scanf("%d%d", &A, &B); R=A+B; if(R>=23){ R=24-24...
a.cc:20:5: error: redefinition of 'int main()' 20 | int main(){ | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main(){ | ^~~~
s524738922
p03773
C++
erview Problem Status Rank (263:51:38) 3 Comments Previous12345…Next Username Prob Result Time (ms) Mem (MB) Lang Submit Time MustafaSaad R Wrong Answer C++ 1 hr ago MustafaSaad R Wrong Answer C++ 1 hr ago MustafaSaad R Wrong Answer C++ 1 hr ago MustafaSaad R Wrong Answer C++ 2 hr ago MustafaSaad R Wrong Answer C+...
a.cc:6:1: error: extended character … is not valid in an identifier 6 | Previous12345…Next | ^ a.cc:120:24: error: extended character © is not valid in an identifier 120 | All Copyright Reserved © 2010-2019 Xu Han | ^ a.cc:123:11: error: "|" is not a valid filename 123 | #2070...
s723654735
p03773
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a , b; scanf("%d %d",&a,&b); if(0<= a+b <=23) { int res=a+b; printf("%d", res); }else if(a+b == 24) { print("00.00") ; }else{ int res=b-1; printf("%d", res); ...
a.cc: In function 'int main()': a.cc:16:13: error: 'print' was not declared in this scope; did you mean 'rint'? 16 | print("00.00") ; | ^~~~~ | rint
s870196169
p03773
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <vector> #include <cmath> #include <iomanip> #include <bitset> #include <string> using namespace std; //cout << << endl; typedef long long int ll; typedef long double ld; int main(){ ll a,b; cin >> a >> b; if (a+b>=24){ a-=24; ...
a.cc: In function 'int main()': a.cc:22:5: error: 'out' was not declared in this scope 22 | out << a+b << endl; | ^~~
s193406351
p03773
C
#include <stdio.h> #include <iostream> using namespace std; int main() { int a,b,x; cin>>a>>b; x=a+b; if(x>23) cout<<x-24; else cout<<x; }
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s473796440
p03773
C
#include <stdio.h> #include <iostream> using namespace std; int main() { int a,b,x; cin>>a>>b; x=a+b; if(x>24) cout<<x-24; else cout<<x; }
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s451045700
p03773
C++
v#include <iostream> using namespace std; int main() { int a,b,rem; cin >>a>>b; cout<<(a+b)%24; return 0; }
a.cc:1:2: error: stray '#' in program 1 | v#include <iostream> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include <iostream> | ^ a.cc: In function 'int main()': a.cc:8:5: error: 'cin' was not declared in this scope 8 | cin >>a>>b; | ^~~ a.cc:10:5: error: 'cout' was not de...
s196964791
p03773
C++
#include<iostream> using namespace std; int main(){ int main() { int a,b; cin>>a>>b; cout<<(a+b)%24<<endl; }
a.cc: In function 'int main()': a.cc:4:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 4 | int main() | ^~ a.cc:4:17: note: remove parentheses to default-initialize a variable 4 | int main() | ^~ | ...
s756006730
p03773
C++
#include<iostream> using namespace std; int main(){ int main() { int a,b; cin>>a>>b; cout<<(a+b)%24; }
a.cc: In function 'int main()': a.cc:4:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 4 | int main() | ^~ a.cc:4:17: note: remove parentheses to default-initialize a variable 4 | int main() | ^~ | ...
s748301412
p03773
C++
Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time.
a.cc:3:24: warning: missing terminating ' character 3 | The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ^ a.cc:3:24: error: missing terminating ' character 3 | The current time is A o'clock, and a con...
s915945033
p03773
C++
include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b; if(0<=a,b<=23){ c=a+b; if(c>=24){ c%=24; } cout<<c; } }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>a>>b; | ^~~ a.cc:11:17: error: 'cout' was not declared in this scope 11 | cout<<c; ...
s458644260
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; cin>>A>>B; if(A>=1&&A<=23&&B>=1&&B<=23){ cout<<A+B<<endl; if(x>24) cout<<B-1<<endl; } }
a.cc: In function 'int main()': a.cc:8:20: error: 'x' was not declared in this scope 8 | if(x>24) | ^
s079678374
p03773
C++
int main() {; int time; int A,B; cin>>A>>B; time =A+B; if(time>24) { time=time-24; cout<<time; } else if(12<time<=24) cout <<time; else if(time<=12) { time=24-time; cout<<time; } return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin>>A>>B; | ^~~ a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout<<time; | ^~~~ a.cc:15:9: error: 'cout' was not declared in this scope 15 | cout <<time; | ...
s429116334
p03773
C++
#include<iostream> using namespace std; int main() {; int time; int A,B cin>>A>>B; time =A+B; if(time>24) { time-=24; cout<<time; } else if(12<time<=24) cout <<time; else if(time<=12) { time=24-time; cout<<time; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: expected initializer before 'cin' 7 | cin>>A>>B; | ^~~ a.cc:8:9: error: 'B' was not declared in this scope 8 | time =A+B; | ^
s530112802
p03773
C++
using namespace std; int main(){ int a,b,time; cin>>a>>b; if((a+b)<=24){ cout<<a+b; } if((a+b)>=24){ cout<<24-(48-(a+b)); } }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>a>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:7:17: ...
s713974475
p03773
C++
#include<iostream> using namespace std; int main(){ int x,y,z; cin>>x>>y; z=x+y;l if(z>24) cout<<z-24; else cout<<z; }
a.cc: In function 'int main()': a.cc:6:15: error: 'l' was not declared in this scope 6 | z=x+y;l | ^ a.cc:9:9: error: 'else' without a previous 'if' 9 | else | ^~~~
s156704773
p03773
C++
#include <iostream> #include <stdio.h> using namespace std; int main() { int s, e,t; scanf_s("%d %d", &s, &e); t = s + e; if (t > 24) t = t-24; printf_s("%d", t); }
a.cc: In function 'int main()': a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | scanf_s("%d %d", &s, &e); | ^~~~~~~ | scanf a.cc:11:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 11 | printf_s("%d", t); ...
s769827346
p03773
C++
#include<bits/stdc++.h> using namespace std; int main() { int a; int b; cin >> a >> b; if (a + b > 24) { cout << a + b - 24 << endl; } else if (a + b =< 24) { cout << a + b << endl; } }
a.cc: In function 'int main()': a.cc:13:19: error: expected primary-expression before '<' token 13 | else if (a + b =< 24) { | ^
s480593368
p03773
C++
include<bits/stdc++.h> using namespace std; int main() { int a; int b; cin >> a >> b; if (a + b > 24) { cout << a + b - 24 << endl; } else if (a + b < 24) { cout << a + b << 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:8:3: error: 'cin' was not declared in this scope 8 | cin >> a >> b; | ^~~ a.cc:11:5: error: 'cout' was not declared in this scope 11 | cout << a + b - 24 << endl; ...
s502878827
p03773
Java
import java.util.*; public class At710 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int A = s.nextInt(); int B = s.nextInt(); int ans = A + B; if (0 <= ans && ans <= 24) { System.out.print(ans); } if (ans > 24) { ...
Main.java:3: error: class At710 is public, should be declared in a file named At710.java public class At710 { ^ 1 error
s830425280
p03773
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c cin>>a>>b; c=a+b; if(c<24) cout<<c<<endl; else cout<<c-24<<endl; }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'cin' 6 | cin>>a>>b; | ^~~ a.cc:7:3: error: 'c' was not declared in this scope 7 | c=a+b; | ^