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... | 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 |... |
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 = 1... | 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... |
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 '#includ... |
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;
... |
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'... |
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'... |
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 '<iostre... |
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 '<iostre... |
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()... | 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... |
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;}
| ^~~~
| ... |
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");
}... | 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 ... | 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 {
... | 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)... | 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/iostr... |
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;
//
stru... | 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;
//
stru... | 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 | ... |
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 ... |
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: ... |
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 'opera... |
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;
... |
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 '#inclu... |
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: no... |
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: no... |
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: no... |
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;
| ~~~~~~~~~~~~~~~... |
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 >>... |
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 >>... |
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 >>... |
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 | ext... |
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 <iost... | 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 = in... | 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... |
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.c... |
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 | c... |
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;
}
}
retur... | 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){
... |
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){
... |
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 ... | 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 | ... |
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 i... |
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();
... | 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-... |
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<... | 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 t... |
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";
... | 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;... | 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... |
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... | 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" <<... | a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'X'
7 | X=X+3
| ^
| ;
8 | X=X%7;
| ~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.