submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s221113642
p00352
Java
import java.util.Scanner; public class Main{ public static void main (String [] args){ Scanner sc = new Scanner (System.in); int a = sc.next Int(); int b = sc.nextInt(); System.out.println((a+b)/2); } }
Main.java:7: error: ';' expected int a = sc.next Int(); ^ 1 error
s916522216
p00352
Java
import java.util.Scanner; public class Main{ public static void main (String [] args){ Scanner sc = new Scanner (System.in); int a = sc.next Int(); int b = sc.next Int(); System.out.println((a+b)/2); } }
Main.java:7: error: ';' expected int a = sc.next Int(); ^ Main.java:8: error: ';' expected int b = sc.next Int(); ^ 2 errors
s091611279
p00352
Java
import java.util.Scanner; import java.util.stream.IntStream; public class Solution{ static IntStream REPS(int v){return IntStream.range(0,v);} static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);} static IntStream INS(int n) {return REPS(n).map(i->getInt());} static Scanner s=new Scanner(System.in); static int getInt(){return Integer.parseInt(s.next());} public static void main(String[]$){ System.out.println((getInt()+getInt())/2); } }
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java public class Solution{ ^ 1 error
s471878369
p00352
Java
import java.io.*; import java.util.*; class Main{ private void compute(){ Scanner scanner = new Scanner(System.in); int a=Scanner.nextInt(); int b=Scanner.nextInt(); System.out.println((a+b)/2); } public static void main(String a[]){ new Main().compute(); } }
Main.java:8: error: non-static method nextInt() cannot be referenced from a static context int a=Scanner.nextInt(); ^ Main.java:9: error: non-static method nextInt() cannot be referenced from a static context int b=Scanner.nextInt(); ^ 2 errors
s548028830
p00352
Java
package volume3; import java.util.Scanner; public class Q0357 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println((sc.nextInt() + sc.nextInt()) / 2); } }
Main.java:5: error: class Q0357 is public, should be declared in a file named Q0357.java public class Q0357 { ^ 1 error
s214267403
p00352
C
#include main(){ int a,b; scanf("%d %d",&a,&b); printf("%d\n",(a+b)/2); return 0; }
main.c:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d %d",&a,&b); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #include main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | scanf("%d %d",&a,&b); | ^~~~~ main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:5:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 5 | printf("%d\n",(a+b)/2); | ^~~~~~ main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:5:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'printf'
s457290565
p00352
C
#include <stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); printf(???%d\n???, (a+b)/2); return 0; }
main.c: In function 'main': main.c:7:8: error: expected expression before '?' token 7 | printf(???%d\n???, (a+b)/2); | ^ main.c:7:13: error: stray '\' in program 7 | printf(???%d\n???, (a+b)/2); | ^
s450734873
p00352
C
#include<iostream> using namespace std; main(){ int a, b; cin >> a >> b; cout << (a+b) << endl; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s155274714
p00352
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s004168434
p00352
C
#include <stdio.h> int main() { int a; int b; int nAnswer; scanf_s("%d%d", &a, &b); nAnswer = ( a + b ) / 2; printf("%d\n", nAnswer); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 9 | scanf_s("%d%d", &a, &b); | ^~~~~~~ | scanf
s264205947
p00352
C++
#include <stdio> int main(void){ int a,b; scanf("%d %d",&a,&b); printf("%d\n",(a+b)/2); return 0; }
a.cc:1:10: fatal error: stdio: No such file or directory 1 | #include <stdio> | ^~~~~~~ compilation terminated.
s847579994
p00352
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s298705323
p00352
C++
#include <iostream> #include <bits/stdc++.h> #define Max(a,b) max({a,b}) #define Min(a,b) min({a,b}) #define rep(i,m,n) for(int (i)=(m);(i)<(int)(n);(i)++) #define len(n) n.size() #define print(n) cout << (n) << endl; // s.substr(i,n) typedef long long ll; using namespace std; //char a = 65; long long int inf = 1000000007; int n,m,a,b,c,d,cou,co; long long int lla,llb,llc; double k; const ll LINF = 1e18; char num = 65; string s,t; int lis[20]; /* int binary(int bina){ int ans = 0; for (int i = 0; bina>0 ; i++) { ans = ans+(bina%2)*pow(10,i); bina = bina/2; } return ans; } */ int main(){ whlie(true){ cin >> a >> b; cout << (a+b)/2 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:40:5: error: 'whlie' was not declared in this scope 40 | whlie(true){ | ^~~~~
s198212014
p00352
C++
#include using namespace std; int main(){ int a, b; cin>>a>>b cost<<(a+b)/2<<end }
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #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 '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include
s555101139
p00352
C++
#include using namespace std; int main(){ int a, b; cin>>a>>b; cost<<(a+b)/2<<endl: }
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #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 '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include a.cc:6:3: error: 'cost' was not declared in this scope; did you mean 'const'? 6 | cost<<(a+b)/2<<endl: | ^~~~ | const a.cc:6:18: error: 'endl' was not declared in this scope 6 | cost<<(a+b)/2<<endl: | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include
s971736519
p00352
C++
#include using namespace std; main(){ int a, b; cin >> a >> b; cout << (a+b)/2 << endl; }
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | 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 | #include a.cc:7:3: error: 'cout' was not declared in this scope 7 | cout << (a+b)/2 << endl; | ^~~~ a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:22: error: 'endl' was not declared in this scope 7 | cout << (a+b)/2 << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include
s643342989
p00352
C++
using namespace std; int main(){ int a,b; cin>>a>>b; cost<<(a+b)/2<<endl: }
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 '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:6:1: error: 'cost' was not declared in this scope; did you mean 'const'? 6 | cost<<(a+b)/2<<endl: | ^~~~ | const a.cc:6:16: error: 'endl' was not declared in this scope 6 | cost<<(a+b)/2<<endl: | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s482081295
p00352
C++
using namespace std; int main(){ int a,b; cin>>a>>b; cost<<(a+b)/2<<endl: return 0; }
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 '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:6:1: error: 'cost' was not declared in this scope; did you mean 'const'? 6 | cost<<(a+b)/2<<endl: | ^~~~ | const a.cc:6:16: error: 'endl' was not declared in this scope 6 | cost<<(a+b)/2<<endl: | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s865044397
p00352
C++
#include <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cost<<(a+b)/2<<endl: return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'cost' was not declared in this scope; did you mean 'const'? 7 | cost<<(a+b)/2<<endl: | ^~~~ | const
s243420567
p00352
C++
#incloude <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)/2<<endl; return0; }
a.cc:1:2: error: invalid preprocessing directive #incloude; did you mean #include? 1 | #incloude <iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | 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 | #incloude <iostream> a.cc:7:1: error: 'cout' was not declared in this scope 7 | cout<<(a+b)/2<<endl; | ^~~~ a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:16: error: 'endl' was not declared in this scope 7 | cout<<(a+b)/2<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #incloude <iostream> a.cc:8:1: error: 'return0' was not declared in this scope 8 | return0; | ^~~~~~~
s815651911
p00352
C++
#incloude <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)/2<<endl; return0; }
a.cc:1:2: error: invalid preprocessing directive #incloude; did you mean #include? 1 | #incloude <iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | 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 | #incloude <iostream> a.cc:7:1: error: 'cout' was not declared in this scope 7 | cout<<(a+b)/2<<endl; | ^~~~ a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:16: error: 'endl' was not declared in this scope 7 | cout<<(a+b)/2<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #incloude <iostream> a.cc:8:1: error: 'return0' was not declared in this scope 8 | return0; | ^~~~~~~
s651036918
p00352
C++
#include <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)/2<<endl; return0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'return0' was not declared in this scope 8 | return0; | ^~~~~~~
s407969538
p00352
C++
a,b=gets.chomp.split(" ").map(&:to_i); print("#{(a+b)/2}\n")
a.cc:1:1: error: 'a' does not name a type 1 | a,b=gets.chomp.split(" ").map(&:to_i); | ^ a.cc:2:6: error: expected constructor, destructor, or type conversion before '(' token 2 | print("#{(a+b)/2}\n") | ^
s154431299
p00352
C++
#include<cstdio> using namespace std; int main() { int a, b; scanf_s("%d %d", &a, &b); printf("%d", (a + b) / 2); return 0; }
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", &a, &b); | ^~~~~~~ | scanf
s174510312
p00352
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OthloKyopro { class Program { static void Main(string[] args) { /* 101*/ var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var sum = 0; foreach(var i in a) { sum += i; } Console.WriteLine(sum / a.Count()); } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:24:6: error: expected ';' after class definition 24 | } | ^ | ; a.cc: In static member function 'static void OthloKyopro::Program::Main(int*)': a.cc:14:13: error: 'var' was not declared in this scope 14 | var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); | ^~~ a.cc:15:17: error: expected ';' before 'sum' 15 | var sum = 0; | ^~~ a.cc:16:25: error: expected ')' before 'i' 16 | foreach(var i in a) | ^ a.cc:16:20: note: to match this '(' 16 | foreach(var i in a) | ^ a.cc:16:13: error: 'foreach' was not declared in this scope 16 | foreach(var i in a) | ^~~~~~~ a.cc:20:13: error: 'Console' was not declared in this scope 20 | Console.WriteLine(sum / a.Count()); | ^~~~~~~ a.cc:20:31: error: 'sum' was not declared in this scope 20 | Console.WriteLine(sum / a.Count()); | ^~~ a.cc:20:37: error: 'a' was not declared in this scope 20 | Console.WriteLine(sum / a.Count()); | ^
s240311809
p00352
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b; c = (a + b)/2 cout << c }
a.cc: In function 'int main()': a.cc:11:16: error: expected ';' before 'cout' 11 | c = (a + b)/2 | ^ | ; 12 | cout << c | ~~~~
s381095527
p00352
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b; int c = (a + b) / 2; cout << c; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: redeclaration of 'int c' 9 | int c = (a + b) / 2; | ^ a.cc:6:13: note: 'int c' previously declared here 6 | int a, b, c; | ^
s111561575
p00352
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s500396985
p00352
C++
a = int(input()) b = int(input()) print((a + b)//2)
a.cc:1:1: error: 'a' does not name a type 1 | a = int(input()) | ^
s718583766
p00352
C++
a, b = map(int, input().split()) print((a + b)/2)
a.cc:1:1: error: 'a' does not name a type 1 | a, b = map(int, input().split()) | ^
s985944806
p00352
C++
a, b = map(int, input().split()) print((a + b)//2)
a.cc:1:1: error: 'a' does not name a type 1 | a, b = map(int, input().split()) | ^
s397306364
p00352
C++
#include <iostream> int main(void){int a,b;std::cin>>a>>b;std::cout<<(a+b)/2<<endl;}
a.cc: In function 'int main()': a.cc:3:59: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 3 | int main(void){int a,b;std::cin>>a>>b;std::cout<<(a+b)/2<<endl;} | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s230502824
p00352
C++
#include "stdafx.h" #include<iostream>; using namespace std; int main() { int a, b,sum; a = 0; b = 0; sum = 0; cin >> a >> b; sum = a + b; cout << sum/2; return 0; }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s321161449
p00352
C++
#include<iostream>; using namespace std; int main() { int a, b; a = 0; b = 0; sum = 0; cin >> a >> b; cout << (a+b)/2; return 0; }
a.cc:1:19: warning: extra tokens at end of #include directive 1 | #include<iostream>; | ^ a.cc: In function 'int main()': a.cc:10:9: error: 'sum' was not declared in this scope 10 | sum = 0; | ^~~
s033119145
p00352
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a,b; cout<<(a+b)/2<<endl; rerturn 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'rerturn' was not declared in this scope 8 | rerturn 0; | ^~~~~~~
s704584256
p00352
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)/2<<endl; rerturn 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'rerturn' was not declared in this scope 8 | rerturn 0; | ^~~~~~~
s319325101
p00353
Java
import java.util.Scanner; public class PCK201703 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int a,f,b; a = stdIn.nextInt(); f = stdIn.nextInt(); b = stdIn.nextInt(); if(a > b) { System.out.println("0"); }else if(a + f < b) { System.out.println("NA"); }else { System.out.println(b -a); } } }
Main.java:3: error: class PCK201703 is public, should be declared in a file named PCK201703.java public class PCK201703 { ^ 1 error
s609433282
p00353
C
#include <stdio.h> int main() { int m; int f; int b; int nFanswer; scanf_s("%d%d%d", &m, &f, &b); if (b > m) { nFanswer = b - m; if (nFanswer <= 0) nFanswer = 0; if (nFanswer < f) { printf("%d\n", nFanswer); } else { printf("NA\n"); } } return 0; }
main.c: In function 'main': main.c:10:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 10 | scanf_s("%d%d%d", &m, &f, &b); | ^~~~~~~ | scanf
s360904469
p00353
C
#include<stdio.h> int main(void) { int m,f,b,sum; scanf("%d %d %d", &m, &f, &b); if(m>=b){ sum = 0; printf("%d\n", sum); } else if(m+f>=b){ sum = b-m; printf("%d\n", sum); else printf("NA\n"); return 0; }
main.c: In function 'main': main.c:14:9: error: expected '}' before 'else' 14 | else printf("NA\n"); | ^~~~
s779718449
p00353
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int a,f,b; a = stdIn.nextInt(); f = stdIn.nextInt(); b = stdIn.nextInt(); if(a > b) { System.out.println("0"); }else if(a + f < b) { System.out.println("NA"); }else { System.out.println(b -a); } } }
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 { | ^~~~~~
s762940889
p00353
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int a,f,b; a = stdIn.nextInt(); f = stdIn.nextInt(); b = stdIn.nextInt(); if(a > b) { System.out.println(0); }else if(a + f < b) { System.out.println("NA"); }else { System.out.println(b -a); } } }
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 { | ^~~~~~
s562863917
p00353
C++
#include<iostream> using namespace std; int main() { int m, f, b; cin >> m >> f >> b; if (m + f >= b) cout << b - m << endl; else if (m >= b) cout << "0" << endl; else cout << "NA" << endl; return 0;
a.cc: In function 'int main()': a.cc:13:14: error: expected '}' at end of input 13 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s974551622
p00353
C++
#include<algorithm> #include<iostream> #include<vector> #include<string> #include<map> #include<stack> #include<queue> #include<iomanip> #include<set> #include<bitset> #include <cstdio> #include <cmath> using namespace std; typedef long long ll; #define put(n) cout<<(n)<<"\n" #define FOR(i,num,N) for(int(i)=(num);(i)<(N);++(i)) #define RFOR(i,num,N) for(int (i)=(num);(i)>(N);--(i)) #define all(v) (v).begin() , (v).end() #define rall(v) (v).rbegin() , (v).rend() int main(){ int M,F,B; cin>>M>>F>>B; if(M >= B) cout<<0<<endl; else if(M<B && M+F >= B) cout<<B-M<<end; else cout<<"NA"<<endl; }
a.cc: In function 'int main()': a.cc:27:39: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 27 | else if(M<B && M+F >= B) cout<<B-M<<end; | ~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t' 306 |
s912921314
p00353
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <string> #include <stack> #include <cmath> #define ll long long #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) using namespace std; // const int inf=1e9+7; const int mod=1e9+7; // struct poi{ int X;int Y;int Z; bool operator<(const poi&R)const{ return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X; } }; // ll GCD(ll a,ll b){ return (b==0)?(a):(GCD(b,a%b)); } ll LCM(ll a,ll b){ return a/GCD(a,b)*b; } // int main(){ int M,F,B; cin>>M>>F>>B; if(M>=B){ cout<<0<<endl; }else if(B-M>=A){ cout<<(B-M)<<endl; }else{ cout<<"NA"<<endll; } return 0; }
a.cc: In function 'int main()': a.cc:36:23: error: 'A' was not declared in this scope 36 | }else if(B-M>=A){ | ^ a.cc:39:29: error: 'endll' was not declared in this scope 39 | cout<<"NA"<<endll; | ^~~~~
s209138500
p00353
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <string> #include <stack> #include <cmath> #define ll long long #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) using namespace std; // const int inf=1e9+7; const int mod=1e9+7; // struct poi{ int X;int Y;int Z; bool operator<(const poi&R)const{ return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X; } }; // ll GCD(ll a,ll b){ return (b==0)?(a):(GCD(b,a%b)); } ll LCM(ll a,ll b){ return a/GCD(a,b)*b; } // int main(){ int M,F,B; cin>>M>>F>>B; if(M>=B){ cout<<0<<endl; }else if(B-M>=F){ cout<<(B-M)<<endl; }else{ cout<<"NA"<<endll; } return 0; }
a.cc: In function 'int main()': a.cc:39:29: error: 'endll' was not declared in this scope 39 | cout<<"NA"<<endll; | ^~~~~
s755639818
p00353
C++
#include<iostream> using namespace std; int main(){ int m,f,b; cin>>m>>f>>b; if(b<(m+f))endl; if(b<=m) cout<< 0 <<endl; else cout<<b-m<<endl; else cout<<"NA"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: statement cannot resolve address of overloaded function 8 | if(b<(m+f))endl; | ^ a.cc:14:3: error: 'else' without a previous 'if' 14 | else | ^~~~
s099472352
p00353
C++
#include<iostream> using namespace std; int main(){ int m,f,b; cin>>m>>f>>b; if{b<(m+f)}endl; if(b<=m) cout<< 0 <<endl; else cout<<b-m<<endl; else cout<<"NA"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: expected '(' before '{' token 8 | if{b<(m+f)}endl; | ^ | ( a.cc:8:18: error: statement cannot resolve address of overloaded function 8 | if{b<(m+f)}endl; | ^ a.cc:14:3: error: 'else' without a previous 'if' 14 | else | ^~~~
s475968751
p00353
C++
#include<iostream> using namespace std; int main(){ int m,f,b; cin>>m>>f>>b; if(b<m+f)endl; if(b<=m) cout<< 0 <<endl; else cout<<b-m<<endl; else cout<<"NA"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: statement cannot resolve address of overloaded function 8 | if(b<m+f)endl; | ^ a.cc:14:3: error: 'else' without a previous 'if' 14 | else | ^~~~
s958477986
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ cin>>m>>f>>b; if m+f<b cout<<NA<<endl; else cout<<f=b-m<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: expected '(' before 'm' 8 | if m+f<b | ^ | ( a.cc:10:2: error: 'else' without a previous 'if' 10 | else | ^~~~ a.cc:12:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 12 | cout<<f=b-m<<endl; | ~~~^~~~~~
s890807570
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ Y=0; cin>>m>>f>>b; if (m+f<b) Y=NA; else Y=b-m; cout<<Y<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: 'Y' was not declared in this scope 9 | Y=0; | ^ a.cc:13:6: error: 'NA' was not declared in this scope 13 | Y=NA; | ^~
s888010815
p00353
C++
#include<iostream> using namespace std; int m,f,b,Y; int main(){ Y=0; cin>>m>>f>>b; if (m+f<b) Y=NA; else Y=b-m; cout<<Y<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:6: error: 'NA' was not declared in this scope 13 | Y=NA; | ^~
s258303646
p00353
C++
#include<iostream> using namespace std; int m,f,b,; int main(){ Y=0; cin>>m>>f>>b; if (m+f<b) cout<<NA<<endl; else cout<<f=b-m<<endl; return 0; }
a.cc:5:11: error: expected unqualified-id before ';' token 5 | int m,f,b,; | ^ a.cc: In function 'int main()': a.cc:9:1: error: 'Y' was not declared in this scope 9 | Y=0; | ^ a.cc:13:10: error: 'NA' was not declared in this scope 13 | cout<<NA<<endl; | ^~ a.cc:15:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 15 | cout<<f=b-m<<endl; | ~~~^~~~~~
s783082777
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ Y=0; cin>>m>>f>>b; if (m+f<b) cout<<NA<<endl; else cout<<f=b-m<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: 'Y' was not declared in this scope 9 | Y=0; | ^ a.cc:13:10: error: 'NA' was not declared in this scope 13 | cout<<NA<<endl; | ^~ a.cc:15:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 15 | cout<<f=b-m<<endl; | ~~~^~~~~~
s067318723
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ Y=0; cin>>m>>f>>b; if (m+f<b) cout<<NA<<endl; else cout<<b-m<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: 'Y' was not declared in this scope 9 | Y=0; | ^ a.cc:13:10: error: 'NA' was not declared in this scope 13 | cout<<NA<<endl; | ^~
s594002629
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ cin>>m>>f>>b; if (m+f<b) cout<<NA<<endl; else cout<<b-m<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: 'NA' was not declared in this scope 12 | cout<<NA<<endl; | ^~
s010696956
p00353
C++
#include using namespace std; main() { int m, f, b; cin>>m>>f>>b; if(m>= b)cout<<0<<endl; else if ( m + f >= b ) cout << b - m << endl; else cout << "NA" << endl; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>m>>f>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include a.cc:7:10: error: 'cout' was not declared in this scope 7 | if(m>= b)cout<<0<<endl; | ^~~~ a.cc:7:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:19: error: 'endl' was not declared in this scope 7 | if(m>= b)cout<<0<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include a.cc:8:24: error: 'cout' was not declared in this scope 8 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:8:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:41: error: 'endl' was not declared in this scope 8 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:8:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:9:6: error: 'cout' was not declared in this scope 9 | else cout << "NA" << endl; | ^~~~ a.cc:9:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:22: error: 'endl' was not declared in this scope 9 | else cout << "NA" << endl; | ^~~~ a.cc:9:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s668288145
p00353
C++
#include using namespace std; int main() { int m, f, b; cin>>m>>f>>b; if(m>= b)cout<<0<<endl; else if ( m + f >= b ) cout << b - m << endl; else cout << "NA" << endl; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>m>>f>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include a.cc:7:10: error: 'cout' was not declared in this scope 7 | if(m>= b)cout<<0<<endl; | ^~~~ a.cc:7:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:19: error: 'endl' was not declared in this scope 7 | if(m>= b)cout<<0<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include a.cc:8:24: error: 'cout' was not declared in this scope 8 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:8:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:41: error: 'endl' was not declared in this scope 8 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:8:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:9:6: error: 'cout' was not declared in this scope 9 | else cout << "NA" << endl; | ^~~~ a.cc:9:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:22: error: 'endl' was not declared in this scope 9 | else cout << "NA" << endl; | ^~~~ a.cc:9:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s813973081
p00353
C++
#include <iostream> using namespace std; int main() { int m, f, b; cin>>m>>f>>b; if(m>= b)cout<<0<<endl; else if ( m + f >= b ) cout << b - m << endl; else cout<<NA<< endl; }
a.cc: In function 'int main()': a.cc:8:12: error: 'NA' was not declared in this scope 8 | else cout<<NA<< endl; | ^~
s919285219
p00353
C++
#include <iostream> using namespace std; int main() { int m, f, b; cin>>m>>f>>b; if(m>= b)cout<<0<<endl; else if ( m + f >= b ) cout << b - m << endl; else cout<<NA<< endl; }
a.cc: In function 'int main()': a.cc:8:12: error: 'NA' was not declared in this scope 8 | else cout<<NA<< endl; | ^~
s514831995
p00353
C++
#include<iostream> uisng namespace std; int main(){ int m,f,b; cin>>m>>f>>b; if(m>b)cout<<" 0 "<<endl; else if(m+f>b)cout<<b-m<<endl; else cout<<" NA "<<endl; return 0; }
a.cc:2:1: error: 'uisng' does not name a type 2 | uisng namespace std; | ^~~~~ 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>>m>>f>>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 input | ^~~ a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if(m>b)cout<<" 0 "<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | if(m>b)cout<<" 0 "<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:9:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | if(m+f>b)cout<<b-m<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | if(m+f>b)cout<<b-m<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<" NA "<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout<<" NA "<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s636861336
p00353
C++
#include<iostream> uisng namespace std; int main(){ int m,f,b; cin>>m>>f>>b; if(m>b)cout<<" 0 "<<endl; else if(m+f>b)cout<<b-m<<endl; else cout<<" NA "<<endl; return 0; }
a.cc:2:1: error: 'uisng' does not name a type 2 | uisng namespace std; | ^~~~~ 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>>m>>f>>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 input | ^~~ a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if(m>b)cout<<" 0 "<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | if(m>b)cout<<" 0 "<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:9:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | if(m+f>b)cout<<b-m<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | if(m+f>b)cout<<b-m<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<" NA "<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout<<" NA "<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s602027661
p00353
C++
#include<iostream> uisng namespace std; int main(){ int m,f,b; cin>>m>>f>>b; if(m>b)cout<<" 0 "<<endl; else if((m+f)>b)cout<<b-m<<endl; else cout<<" NA "<<endl; return 0; }
a.cc:2:1: error: 'uisng' does not name a type 2 | uisng namespace std; | ^~~~~ 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>>m>>f>>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 input | ^~~ a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if(m>b)cout<<" 0 "<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | if(m>b)cout<<" 0 "<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:9:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | if((m+f)>b)cout<<b-m<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | if((m+f)>b)cout<<b-m<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<" NA "<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout<<" NA "<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s373632689
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ cin>>m>>f>>b; if (m+f<b) cout<<"NA"<<endl; if (m-b>0> cout<<(0)<<endl; else cout<<(m-b)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:12: error: no match for 'operator>' (operand types are 'bool' and 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'}) 13 | if (m-b>0> | ~~~~~^ | | | bool 14 | cout<<(0)<<endl; | ~~~~~~~~~~~~~~~ | | | std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>} a.cc:13:12: note: candidate: 'operator>(int, int)' (built-in) 13 | if (m-b>0> | ~~~~~^ 14 | cout<<(0)<<endl; | ~~~~~~~~~~~~~~~ a.cc:13:12: note: no known conversion for argument 2 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::pair<_T1, _T2>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:14:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const _CharT*' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:14:15: note: mismatched types 'const std::tuple<_UTypes ...>' and 'bool' 14 | cout<<(0)<<endl; | ^~~~ a.cc:15:4: error: expected primary-expression before 'else' 15 | else | ^~~~ a.cc:14:20: error: expected ')' before 'else' 14 | cout<<(0)<<endl; | ^ | ) 15 | else | ~~~~ a.cc:13:6: note: to match this '(' 13 | if (m-b>0> | ^
s596226244
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ cin>>m>>f>>b; if (m+f<b) cout<<NA<<endl; if (m>b) cout<<0<<endl; else cout<<b-m<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: 'NA' was not declared in this scope 12 | cout<<NA<<endl; | ^~
s651170277
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ cin>>m>>f>>b; if (m+f<b) cout<<""NA""<<endl; if (m>b) cout<<0<<endl; else cout<<b-m<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:14: error: unable to find string literal operator 'operator""NA' with 'const char [1]', 'long unsigned int' arguments 12 | cout<<""NA""<<endl; | ^~
s541459490
p00353
C++
#include<iostream> using namespace std; int m,f,b; int main(){ cin>>m>>f>>b; if (m> = b) cout<<0<<endl; if (m+f >= b) cout<<b-m<<endl; else cout<<"NA"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: expected primary-expression before '=' token 11 | if (m> = b) | ^
s117051294
p00353
C++
#include using namespace std; main() { int m, f, b; cin >> m >> f >> b; if ( m >= b ) cout << 0 << endl; else if ( m + f >= b ) cout << b - m << endl; else cout << "NA" << endl; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:6:4: error: 'cin' was not declared in this scope 6 | cin >> m >> f >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include a.cc:8:18: error: 'cout' was not declared in this scope 8 | if ( m >= b ) cout << 0 << endl; | ^~~~ a.cc:8:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:31: error: 'endl' was not declared in this scope 8 | if ( m >= b ) cout << 0 << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include a.cc:9:27: error: 'cout' was not declared in this scope 9 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:9:27: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:44: error: 'endl' was not declared in this scope 9 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:9:44: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:10:9: error: 'cout' was not declared in this scope 10 | else cout << "NA" << endl; | ^~~~ a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:25: error: 'endl' was not declared in this scope 10 | else cout << "NA" << endl; | ^~~~ a.cc:10:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s979717505
p00353
C++
#include using namespace std; main() { int m, f, b; cin >> m >> f >> b; if ( m >= b ) cout << 0 << endl; else if ( m + f >= b ) cout << b - m << endl; else cout << "NA" << endl; return 0; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:6:4: error: 'cin' was not declared in this scope 6 | cin >> m >> f >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include a.cc:8:18: error: 'cout' was not declared in this scope 8 | if ( m >= b ) cout << 0 << endl; | ^~~~ a.cc:8:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:31: error: 'endl' was not declared in this scope 8 | if ( m >= b ) cout << 0 << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include a.cc:9:27: error: 'cout' was not declared in this scope 9 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:9:27: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:44: error: 'endl' was not declared in this scope 9 | else if ( m + f >= b ) cout << b - m << endl; | ^~~~ a.cc:9:44: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:10:9: error: 'cout' was not declared in this scope 10 | else cout << "NA" << endl; | ^~~~ a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:25: error: 'endl' was not declared in this scope 10 | else cout << "NA" << endl; | ^~~~ a.cc:10:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s400828618
p00353
C++
#include using namespace std; main() { int m, f, b; cin >> m >> f >> b; if ( b > (m + f) ) cout << "NA" << endl; else if ( b <= m ) cout << 0 << endl; else cout << b-m << endl; return 0; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:6:4: error: 'cin' was not declared in this scope 6 | cin >> m >> f >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include a.cc:8:24: error: 'cout' was not declared in this scope 8 | if ( b > (m + f) ) cout << "NA" << endl; | ^~~~ a.cc:8:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:40: error: 'endl' was not declared in this scope 8 | if ( b > (m + f) ) cout << "NA" << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include a.cc:10:18: error: 'cout' was not declared in this scope 10 | if ( b <= m ) cout << 0 << endl; | ^~~~ a.cc:10:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:31: error: 'endl' was not declared in this scope 10 | if ( b <= m ) cout << 0 << endl; | ^~~~ a.cc:10:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:11:9: error: 'cout' was not declared in this scope 11 | else cout << b-m << endl; | ^~~~ a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:24: error: 'endl' was not declared in this scope 11 | else cout << b-m << endl; | ^~~~ a.cc:11:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s242563858
p00353
C++
#include <cstdio> using namespace std; int main() { int m,f,b; scanf( "%d %d %d\n", &m, &f, &b ); int ret = b - m; if( ret < 0 ) { printf("%d\n", 0 ); } else if( f < ret ) { printf("NA\n"); } else { printf8 "%d\n", ret ); } return 0; }
a.cc: In function 'int main()': a.cc:20:9: error: 'printf8' was not declared in this scope; did you mean 'printf'? 20 | printf8 "%d\n", ret ); | ^~~~~~~ | printf
s432821749
p00353
C++
#include <cstdio> using namespace std; int main() { int m,f,b; scanf( "%d %d %d\n", &m, &f, &b ); int ret = b - m; if( ret < 0 ) { printf("%d\n", 0 ); } else if( f < ret ) { printf("NA\n"); } else { printf() "%d\n", ret ); } return 0; }
a.cc: In function 'int main()': a.cc:20:15: error: too few arguments to function 'int printf(const char*, ...)' 20 | printf() "%d\n", ret ); | ~~~~~~^~ In file included from /usr/include/c++/14/cstdio:42, from a.cc:1: /usr/include/stdio.h:363:12: note: declared here 363 | extern int printf (const char *__restrict __format, ...); | ^~~~~~
s099946891
p00353
C++
#include <iostream> using namespace std; int main(){ int a ,b ,c; cin >> a >> b >> c if(a + b < c){ cout << "NA" << endl; return 0; } if(a >= c){ cout << 0 << endl; return 0; } cout << c-a << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:27: error: expected ';' before 'if' 6 | cin >> a >> b >> c | ^ | ; 7 | if(a + b < c){ | ~~
s311814573
p00353
C++
#include<cstdio> using namespace std; int main() { int a, b,c; scanf_s("%d %d %d", &b, &a,&c); if (b >= c) printf("0\n"); else if(a+b>=c) printf("%d\n", c-b); else printf("NA"); return 0; }
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 %d", &b, &a,&c); | ^~~~~~~ | scanf
s677922402
p00353
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> #include <algorithm> using namespace std; int main() { auto i=0; int m,f,b cin>>m>>f>>b; if(m>=b){ i=0; cout <<i<< endl; }else if((m+f)-b<0){ cout <<"NA"<< endl; }else { cout <<b-m<< endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:9: error: expected initializer before 'cin' 17 | cin>>m>>f>>b; | ^~~ a.cc:18:15: error: 'b' was not declared in this scope 18 | if(m>=b){ | ^
s278711360
p00353
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace OthloKyopro { class Program { static void Main(string[] args) { /* 2 */ var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); var own = input[0]; var a = input[1]; var book = input[2]; if(own > book) { Console.WriteLine(0); } else if(own + a > book) { Console.WriteLine(book - own); } else { Console.WriteLine("NA"); } } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | static void Main(string[] args) | ^~~~ a.cc:31:6: error: expected ';' after class definition 31 | } | ^ | ; a.cc: In static member function 'static void OthloKyopro::Program::Main(int*)': a.cc:13:13: error: 'var' was not declared in this scope 13 | var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); | ^~~ a.cc:14:17: error: expected ';' before 'own' 14 | var own = input[0]; | ^~~ a.cc:15:17: error: expected ';' before 'a' 15 | var a = input[1]; | ^ a.cc:16:17: error: expected ';' before 'book' 16 | var book = input[2]; | ^~~~ a.cc:17:16: error: 'own' was not declared in this scope 17 | if(own > book) | ^~~ a.cc:17:22: error: 'book' was not declared in this scope; did you mean 'bool'? 17 | if(own > book) | ^~~~ | bool a.cc:19:17: error: 'Console' was not declared in this scope 19 | Console.WriteLine(0); | ^~~~~~~ a.cc:21:27: error: 'a' was not declared in this scope 21 | else if(own + a > book) | ^ a.cc:23:17: error: 'Console' was not declared in this scope 23 | Console.WriteLine(book - own); | ^~~~~~~ a.cc:27:17: error: 'Console' was not declared in this scope 27 | Console.WriteLine("NA"); | ^~~~~~~
s935634578
p00353
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if (a>=c) cout<<0<<endl; else if (a+b<c) cout<<"NA"<<endl; else cout<<a-c<<end; return 0; }
a.cc: In function 'int main()': a.cc:8:23: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | else cout<<a-c<<end; | ~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t' 306 | operator<<(nullptr_t)
s298496780
p00353
C++
/* int main(){ } */
/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
s939990393
p00353
C++
int main(){
a.cc: In function 'int main()': a.cc:1:12: error: expected '}' at end of input 1 | int main(){ | ~^
s847916054
p00353
C++
#include<iostream> using namespace std; int main(){ int m,f,n; cin>>m>>f>>n; if(m+f<n)cout<<"NA"<<endl; else{ if(n<=m){ cout<<0<<endl; } else{ cout<<n-m<<endl; } }
a.cc: In function 'int main()': a.cc:14:2: error: expected '}' at end of input 14 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s505305666
p00353
C++
#include <stdio.h> int main(void){ int temochi,a,nedan; int ans1,ans2; scanf("%d %d %d",&temoci,&a,&nedan); ans1 = temochi+a; if(ans1<nedan){ printf("NA\n"); }else{ ans2 = nedan-temochi; if(ans2<=0){ printf("0\n"); }else{ printf("%d\n",ans2); } } return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: 'temoci' was not declared in this scope; did you mean 'temochi'? 8 | scanf("%d %d %d",&temoci,&a,&nedan); | ^~~~~~ | temochi
s460745962
p00353
C++
#include <stdio.h> int main(void){ int temochi,a,nedan; int ans1,ans2; scanf("%d %d %d",&temoci,&a,&nedan); ans1 = temochi+a; if(ans1<nedan){ printf("NA\n"); }else{ ans2 = nedan-temochi; if(ans2<=0){ printf("0\n"); }else{ printf("%d\n",ans2); } } return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: 'temoci' was not declared in this scope; did you mean 'temochi'? 8 | scanf("%d %d %d",&temoci,&a,&nedan); | ^~~~~~ | temochi
s012115325
p00353
C++
#include <stdio.h> int main(void) { int a, b, c; scanf_s("%d %d %d", &a, &b, &c); if (a >= c) { printf("0\n"); } else if ((a + b) <= c) { printf("NA\n"); } else { printf("%d\n", c - a); } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d %d %d", &a, &b, &c); | ^~~~~~~ | scanf
s049850204
p00353
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>=c)cout<<"0"<<<endl; else if(a+b<c)cout<<"NA"<<endl; else cout<<c-a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:28: error: expected primary-expression before '<' token 7 | if(a>=c)cout<<"0"<<<endl; | ^
s216440142
p00353
C++
int main() { int a,b,c; cin>>a>>b>>c; cout<<b-c+a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin>>a>>b>>c; | ^~~ a.cc:4:9: error: 'cout' was not declared in this scope 4 | cout<<b-c+a<<endl; | ^~~~ a.cc:4:22: error: 'endl' was not declared in this scope 4 | cout<<b-c+a<<endl; | ^~~~
s330817720
p00353
C++
#include <iostream> using namespace std; int main(){ int m; //自分の金額 int f; //A君の金額 int b;//本の値段 if (m >= b){ cout << "0" << endl; } if (m < b){ if (m + f < b){ cout << "NA" << endl; } else{ cout << b - m + f << endl; } } return 0; }
a.cc:6:7: error: extended character   is not valid in an identifier 6 | int f; //A君の金額 | ^ a.cc: In function 'int main()': a.cc:6:7: error: '\U00003000' was not declared in this scope 6 | int f; //A君の金額 | ^~ a.cc:9:14: error: 'b' was not declared in this scope 9 | if (m >= b){ | ^ a.cc:13:13: error: 'b' was not declared in this scope 13 | if (m < b){ | ^
s218919923
p00353
C++
#include <iostream> using namespace std; int main(){ int m; //自分の金額 int f; //A君の金額 int b;//本の値段 if (m >= b){ cout << "0" << endl; } if (m < b){ if (m + f < b){ cout << "NA" << endl; } else{ cout << b - m + f << endl; } } return 0; }
a.cc:6:7: error: extended character   is not valid in an identifier 6 | int f; //A君の金額 | ^ a.cc: In function 'int main()': a.cc:6:7: error: '\U00003000' was not declared in this scope 6 | int f; //A君の金額 | ^~ a.cc:9:14: error: 'b' was not declared in this scope 9 | if (m >= b){ | ^ a.cc:13:13: error: 'b' was not declared in this scope 13 | if (m < b){ | ^
s955180230
p00353
C++
#include <iostream> using namespace std; int main(){ int m; //自分の金額 int f; //A君の金額 int b;//本の値段 cin >> m; cin >> f; cin >> b; if (m >= b){ cout << "0" << endl; } if (m < b){ if (m + f < b){ cout << "NA" << endl; } else{ cout << b - m + f << endl; } } return 0; }
a.cc:6:7: error: extended character   is not valid in an identifier 6 | int f; //A君の金額 | ^ a.cc: In function 'int main()': a.cc:6:7: error: '\U00003000' was not declared in this scope 6 | int f; //A君の金額 | ^~ a.cc:11:12: error: 'b' was not declared in this scope 11 | cin >> b; | ^
s969457454
p00353
C++
#include <iostream> using namespace std; int main(){ int m; //自分の金額 int f; //A君の金額 int b; //本の値段 cin >> m; cin >> f; cin >> b; if (m >= b) cout << "0" << endl; else if((m + b) < b) cout << "NA" << endl; else cout << (m + f) - b << endl; return 0; }
a.cc:6:11: error: extended character   is not valid in an identifier 6 | int f; //A君の金額 | ^ a.cc: In function 'int main()': a.cc:6:11: error: '\U00003000' was not declared in this scope 6 | int f; //A君の金額 | ^~ a.cc:11:12: error: 'b' was not declared in this scope 11 | cin >> b; | ^
s586543921
p00353
C++
int main() { int a , b , c , d; cin >> a >> b >> c ; d = c-a; if (d<= b) cout <<d << endl ; else cout <<"NA"<<endl; cout << (a+b)/2 <<endl; return 0 ; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope 4 | cin >> a >> b >> c ; | ^~~ a.cc:6:20: error: 'cout' was not declared in this scope 6 | if (d<= b) cout <<d << endl ; | ^~~~ a.cc:6:32: error: 'endl' was not declared in this scope 6 | if (d<= b) cout <<d << endl ; | ^~~~ a.cc:7:14: error: 'cout' was not declared in this scope 7 | else cout <<"NA"<<endl; | ^~~~ a.cc:7:27: error: 'endl' was not declared in this scope 7 | else cout <<"NA"<<endl; | ^~~~ a.cc:8:9: error: 'cout' was not declared in this scope 8 | cout << (a+b)/2 <<endl; | ^~~~ a.cc:8:27: error: 'endl' was not declared in this scope 8 | cout << (a+b)/2 <<endl; | ^~~~
s104567368
p00354
C
#include<stdio.h> int main(){ int x; scanf("%d",&x); if(x%7==2)printf("sat\n"); if(x%7==3)printf("sun\n"); if(x%7==4)printf("mon\n"); if(x%7==5)printf("tue\n"); if(x%7==6)printf("wed\n"); if(x%7==0)printf("thu\n"); if(x%7==2)printf("fri\n"); retrun 0; }
main.c: In function 'main': main.c:12:1: error: 'retrun' undeclared (first use in this function) 12 | retrun 0; | ^~~~~~ main.c:12:1: note: each undeclared identifier is reported only once for each function it appears in main.c:12:7: error: expected ';' before numeric constant 12 | retrun 0; | ^~ | ;
s733491767
p00354
C++
import java.util.Calendar; import java.util.Locale; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { int X = sc.nextInt(); Calendar calendar = Calendar.getInstance(); calendar.set(2017, Calendar.SEPTEMBER, X); System.out.println(calendar.getDisplayName( Calendar.DAY_OF_WEEK, Calendar.SHORT, Locale.ENGLISH).toLowerCase()); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Calendar; | ^~~~~~ 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.Locale; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 | public class Main { | ^~~~~~
s810263643
p00354
C++
#include <iosteam> using namespace std; int main(){ int a; cin>>a; if (a%7==0) cout<<"thu"<<endl; if (a%7==1) cout<<"fri"<<endl; if (a%7==2) cout<<"sat"<<endl; if (a%7==3) cout<<"sun"<<endl; if (a%7==4) cout<<"mon"<<endl; if (a%7==5) cout<<"tue"<<endl; if (a%7==6) cout<<"wed"<<endl; return 0; }
a.cc:1:10: fatal error: iosteam: No such file or directory 1 | #include <iosteam> | ^~~~~~~~~ compilation terminated.
s283086164
p00354
C++
#include<iostream> using namespace std; int main() { char week[8][20]={{"thu"},{"fri"},{"sat"},{"sun"},{"mon"},{"tue"},{"wed"}} int day; cin >> day; cout << week[day%7] << enld; }
a.cc: In function 'int main()': a.cc:8:1: error: expected ',' or ';' before 'int' 8 | int day; | ^~~ a.cc:10:8: error: 'day' was not declared in this scope 10 | cin >> day; | ^~~ a.cc:12:24: error: 'enld' was not declared in this scope 12 | cout << week[day%7] << enld; | ^~~~
s916165849
p00354
C++
X = int(input()) if(X % 7 == 0): print("thu") elif(X % 7 == 1): print("fri") elif(X % 7 == 2): print("sat") elif(X % 7 == 3): print("sun") elif(X % 7 == 4): print("mon") elif(X % 7 == 5): print("tue") elif(X % 7 == 6): print("wed")
a.cc:1:1: error: 'X' does not name a type 1 | X = int(input()) | ^
s406552269
p00354
C++
int main() { int X; cin>>X; X=9-X; if(X<0){ X=X*-1; } for(int i=0;X<8;i++){ X=X-7; } switch(X){ case 1:cout<<"sun"<<endl; break; case 2:cout<<"mon"<<endl; break; case 3:cout<<"tue"<<endl; break; case 4:cout<<"wed"<<endl; break; case 5:cout<<"thu"<<endl; break; case 6:cout<<"fri"<<endl; break; case 7:cout<<"sat"<<endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin>>X; | ^~~ a.cc:12:24: error: 'cout' was not declared in this scope 12 | case 1:cout<<"sun"<<endl; | ^~~~ a.cc:12:37: error: 'endl' was not declared in this scope 12 | case 1:cout<<"sun"<<endl; | ^~~~
s352217624
p00354
C++
#include <iostream> using namespace std; int main() { int x; int n; cin >>x; n = x % 7 if(n==0){ cout << "sun" << endl; } else{ } system("pause"); return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: expected ';' before 'if' 11 | n = x % 7 | ^ | ; 12 | 13 | if(n==0){ | ~~ a.cc:17:5: error: 'else' without a previous 'if' 17 | else{ | ^~~~
s027671423
p00354
C++
#include <iostream> using namespace std ; int main() { int x; cin >>x; if ( x = 1,8,15,22,29)cout <<"fti"; if ( x = 2,9,16,23,30)cout << "sat"; if ( x = 3,10,17,24)cout <<"sun"; if ( x = 4,11,18,25)cout <<"mon"; if (x=5,12,19,26)cout <<"tue"; if (x = 6,13,20,27)cout<<"wed"; if ( x = 7,14,21,28)cout << "thu"; cout <<endl return 0 ; }
a.cc: In function 'int main()': a.cc:15:20: error: expected ';' before 'return' 15 | cout <<endl | ^ | ; 16 | return 0 ; | ~~~~~~
s930974705
p00354
C++
#include<iostream> using namespace std; int main(){ int day; cin >> day; day += 3; day = day % 7; switch(day){ case 0: cout << "mon" << endl; break;#include<iostream> using namespace std; int main(){ int day; cin >> day; day += 3; day = day % 7; switch(day){ case 0: cout << "mon" << endl; break; case 1: cout << "tue" << endl; break; case 2: cout << "wed" << endl; break; case 3: cout << "thu" << endl; break; case 4: cout << "fri" << endl; break; case 5: cout << "sat" << endl; break; case 6: cout << "sun" << endl; break; } } case 1: cout << "tue" << endl; break; case 2: cout << "wed" << endl; break; case 3: cout << "thu" << endl; break; case 4: cout << "fri" << endl; break; case 5: cout << "sat" << endl; break; case 6: cout << "sun" << endl; break; } }
a.cc:10:43: error: stray '#' in program 10 | case 0: cout << "mon" << endl; break;#include<iostream> | ^ a.cc: In function 'int main()': a.cc:10:44: error: 'include' was not declared in this scope 10 | case 0: cout << "mon" << endl; break;#include<iostream> | ^~~~~~~ a.cc:10:60: error: expected primary-expression before '>' token 10 | case 0: cout << "mon" << endl; break;#include<iostream> | ^ a.cc:11:1: error: expected primary-expression before 'using' 11 | using namespace std; | ^~~~~ a.cc:13:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 13 | int main(){ | ^~ a.cc:13:9: note: remove parentheses to default-initialize a variable 13 | int main(){ | ^~ | -- a.cc:13:9: note: or replace parentheses with braces to value-initialize a variable a.cc:13:11: error: a function-definition is not allowed here before '{' token 13 | int main(){ | ^
s534722082
p00354
C++
#include<iostream> using namespace std; int main(){ int X; cin>>X; int sa=X-9; if(sa>=0){ switch(sa%7){ case 0:cout<<"sat";break; case 1:cout<<"sun";break; case 2:cout<<"mon";break; case 3:cout<<"tue";break; case 4:cout<<"wed";break; case 5:cout<<"thu";break; case 6:cout<<"fri";break; } } else{ sa*=-1; switch(sa%7){ cout 0:cout<<"sat";break; case 1:cout<<"fri";break; case 2:cout<<"thu";break; case 3:cout<<"wed";break; case 4:cout<<"tue";break; case 5:cout<<"mon";break; case 6:cout<<"sun";break; } } cout<<endl; }
a.cc: In function 'int main()': a.cc:23:11: error: expected ';' before numeric constant 23 | cout 0:cout<<"sat";break; | ^~ | ;
s797101253
p00354
C++
#include<iostream> using namespace std; int main(){ int X,Y; cin>>X; X=X+3 X=X%7; switch(X){ case 0: cout << "mon" << endl; break; case 1: cout << "tue" << endl; break; case 2: cout << "wed" << endl; break; case 3: cout << "thu" << endl; break; case 4: cout << "fri" << endl; break; case 5: cout << "sat" << endl; break; case 6: cout << "sun" << endl; break; } }
a.cc: In function 'int main()': a.cc:7:8: error: expected ';' before 'X' 7 | X=X+3 | ^ | ; 8 | X=X%7; | ~