submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s038987006
p00513
C++
#include<iostream> using namespace std; bool f(long long a) { if(a % 2 =v 0) return false; for(long long i = 3; i *i <= a; i += 2) if(a % i == 0) return false; return true; } int main() { int n; cin >> n; int res=0; for(int i=0; i<n; i++) { long long a; cin a; if(f2ga+1)) res++; } cou...
a.cc: In function 'bool f(long long int)': a.cc:4:13: error: 'v' was not declared in this scope 4 | if(a % 2 =v 0) return false; | ^ a.cc:4:14: error: expected ')' before numeric constant 4 | if(a % 2 =v 0) return false; | ~ ^~ | ) a.cc: In function 'int...
s495725196
p00513
C++
#include<iostream> using namespace std; bool f(long long a) { if(a % 2 =v 0) return false; for(long long i = 3; i *i <= a; i += 2) if(a % i == 0) return false; return true; } int main() { int n; cin >> n; int res=0; for(int i=0; i<n; i++j { long long a; cin a; if(f(a*2+1)) res++; } co...
a.cc: In function 'bool f(long long int)': a.cc:4:13: error: 'v' was not declared in this scope 4 | if(a % 2 =v 0) return false; | ^ a.cc:4:14: error: expected ')' before numeric constant 4 | if(a % 2 =v 0) return false; | ~ ^~ | ) a.cc: In function 'int...
s805466416
p00513
C++
#include<iostream> using namespace std; bool f(long long a) { if(a % 2 =v 0) return false; for(long long i = 3; i *i <= a; i += 2) if(a % i == 0) return false; return true; } int main() { int n; cin >> n; int res=0; for(int i=0; i<n; i++) { long long a; cin a; if(f(a*2+1)) res++; } c...
a.cc: In function 'bool f(long long int)': a.cc:4:13: error: 'v' was not declared in this scope 4 | if(a % 2 =v 0) return false; | ^ a.cc:4:14: error: expected ')' before numeric constant 4 | if(a % 2 =v 0) return false; | ~ ^~ | ) a.cc: In function 'int...
s606674365
p00513
C++
#include<iostream> using namespace std; bool f(long long a) { if(a % 2 == 0) return false; for(long long i = 3; i *i <= a; i += 2) if(a % i == 0) return false; return true; } int main() { int n; cin >> n; int res=0; for(int i=0; i<n; i++) { long long a; cin a; if(f(a*2+1)) res++; } ...
a.cc: In function 'int main()': a.cc:16:8: error: expected ';' before 'a' 16 | cin a; | ^~ | ;
s576864104
p00513
C++
#include<bits/stdc++.h> using namespace std; bool judge(long long int x,int n){ if((n-x)%(2*x+1)==0){return true;} return false; } int main(){ int count=0; int m; cin>>m; for(int t=0;t<m;t++){ int n; cin>>n; if(n==0){break;} bool j=true; for(int x=1;x*x<=n;x++){ if(judge(x,n)){j=fal...
a.cc: In function 'int main()': a.cc:36:3: error: 'retur' was not declared in this scope 36 | retur | ^~~~~ a.cc:36:8: error: expected '}' at end of input 36 | retur | ^ a.cc:11:11: note: to match this '{' 11 | int main(){ | ^
s316951796
p00513
C++
#include<bits/stdc++.h> using namespace std; bool judge(long long int x,int n){ if((n-x)%(2*x+1)==0){return true;} return false; } int main(){ int count=0; int m; cin>>m; for(int t=0;t<m;t++){ int n; cin>>n; if(n==0){break;} bool j=true; for(int x=1;x*x<=n;x++){ if(judge(x,n)){j=fal...
a.cc: In function 'int main()': a.cc:36:12: error: expected '}' at end of input 36 | return 0; | ^ a.cc:11:11: note: to match this '{' 11 | int main(){ | ^
s781879870
p00514
Java
import java.util.*; import java.math.*; import java.lang.*; class Main{ static Scanner sc = new Scanner(System.in); public static void main(String[] args){ int n=sc.nectInt(); int m=sc.nextInt(); int r=sc.nextInt(); r-=n*m; if(r<0)System.out.println(0); else { BigInteger ans...
Main.java:10: error: cannot find symbol int n=sc.nectInt(); ^ symbol: method nectInt() location: variable sc of type Scanner 1 error
s241154671
p00514
C++
def permutation(n,r) result=1 for i in 0..r-1 do result*=n-i end return result end def factorial(x) result=1 for i in 1..x do result*=i end return result end def solve(n,m,r) if n+r-n*m-1<n-1||n+r-n*m-1<0||n-1<0 then return 0 end return permutation(n+r-n*m-1,n-1)/factorial(n-1) end n,m,r=gets.split(...
a.cc:3:18: error: too many decimal points in number 3 | for i in 0..r-1 do | ^~~~ a.cc:11:18: error: too many decimal points in number 11 | for i in 1..x do | ^~~~ a.cc:24:19: error: stray '\' in program 24 | n,m,r=gets.split(/\s/).map{|x|x.to_i} ...
s579093020
p00514
C++
def fact(n): res = 1 for i in range(1, n+1): res *= i return res def combination(n, k): return fact(n)//fact(n-k)//fact(k) n, m, r = list(map(int, input().split())) print(combination(r - n*m + n - 1, n-1))
a.cc:1:1: error: 'def' does not name a type 1 | def fact(n): | ^~~
s908439561
p00514
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using int_t = long long; constexpr int_t BASE = 100000000 * 100000000, LEN = 16; class bigint { private: bool negative; std::vector<int_t> a; bigint& normalize(); public: bigint(int_t x = 0); bigint(const std::string& s); ...
a.cc:7:34: warning: integer overflow in expression of type 'int' results in '1874919424' [-Woverflow] 7 | constexpr int_t BASE = 100000000 * 100000000, LEN = 16; | ~~~~~~~~~~^~~~~~~~~~~ a.cc:7:34: error: overflow in constant expression [-fpermissive] a.cc:7:36: error: overflow in consta...
s788614200
p00514
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using int_t = long long; constexpr int_t BASE = 100000000LL * 100000000LL, LEN = 16; class bigint { private: bool negative; std::vector<int_t> a; bigint& normalize(); public: bigint(int_t x = 0); bigint(const std::string& ...
a.cc:226:2: error: stray '#' in program 226 | }#include <iostream> | ^ a.cc: In constructor 'bigint::bigint(const std::string&)': a.cc:56:36: warning: overflow in conversion from 'long long int' to 'int' changes value from '10000000000000000' to '1874919424' [-Woverflow] 56 | for (int i = s.size() - 1, ...
s809427973
p00514
C++
import std.bigint; import std.stdio; import core.stdc.stdio; void main() { int n,m,r; scanf("%d%d%d",&n,&m,&r); r -= n*m; if(r<=0) puts("0"); else{ BigInt ans = 1; for(int i=1; i<n; i++){ ans = ans * (i+r) / i; } writeln(ans); } }
a.cc:1:1: error: 'import' does not name a type 1 | import std.bigint; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import std.stdio; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: e...
s340598074
p00514
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<cstdio> #include<sstream> #include<iomanip> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #defi...
a.cc:39:14: error: extra qualification 'Calc::' on member 'ladd' [-fpermissive] 39 | void Calc::ladd(int a[], int b[]){ | ^~~~ a.cc:50:14: error: extra qualification 'Calc::' on member 'lsub' [-fpermissive] 50 | void Calc::lsub(int a[], int b[]){ | ^~~~ a.cc:6...
s980766672
p00514
C++
#include <cstdio> #include <cstring> #define BASE (1000000) typedef long long lint; int main() { int n, m, r; int head, tail; int i, j; static lint ans[20000], temp[20000]; lint carry; tail = sizeof(ans) / sizeof(__int64) - 1; scanf("%d%d%d", &n, &m, &r); if (r - m * n <...
a.cc: In function 'int main()': a.cc:15:33: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 15 | tail = sizeof(ans) / sizeof(__int64) - 1; | ^~~~~~~ | __int64_t
s270097535
p00514
C++
// -*- coding:utf-8; tab-width:4 -*- #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> #include <numeric> #include <complex> #include <functional> #include <iterator> #include <cstdio> #incl...
a.cc:42:9: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive] 42 | solve() { | ^~~~~ a.cc: In member function 'bool solution::Solution::input()': a.cc:40:9: warning: no return statement in function returning non-void [-Wreturn-type] 40 | } | ^ a.c...
s838213767
p00514
C++
import math import sys n, m, r=sys.stdin.readline().split() n=int(n) m=int(m) r=int(r) if r-n*m >= 0: print math.factorial(r-n*m+n-1)/math.factorial(r-n*m)/math.factorial(n-1) else : print 0
a.cc:1:1: error: 'import' does not name a type 1 | import math | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s900918896
p00514
C++
def foo(infile, outfile): import math n, m, r=infile.readline().split() n=int(n) m=int(m) r=int(r) print 0 if r-n*m >= 0: print math.factorial(r-n*m+n-1)/math.factorial(r-n*m)/math.factorial(n-1) else : print 0 if __name__ == "__main__": import sys foo(sys.stdin...
a.cc:2:1: error: 'def' does not name a type 2 | def foo(infile, outfile): | ^~~
s458651615
p00514
C++
#include <iostream> using namespace std; int N, M, R; int memo[10000][10000]; int rec(int i, int rest) { if(memo[i][rest] == -1) return memo[i][rest]; if(i == N) return rest == 0; int ret = 0; for(int use = 0; use <= rest; use++) { ret += rec(i+1, rest - use); } return memo[i][rest] = ret; } int main()...
a.cc: In function 'int main()': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(memo, -1, sizeof memo); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include ...
s571786853
p00514
C++
def kaijou(n): res=1 for i in xrange(1,x+1): res*=i return res def comb(a,b): if(a<b or b<0):return 0 if(b==0):return 1 return kaijou(a)/kaijou(b)/kaijou(a-b) a,b,c=map(int,raw_input().split()) c-=a*b print comb(c+a-1,c)
a.cc:1:1: error: 'def' does not name a type 1 | def kaijou(n): | ^~~
s473151375
p00515
Java
import java.util.Scanner; public class AverageScore { public static void main(String[] args) { final Scanner sc= new Scanner(System.in); int sum=0; for(int i=0;i<5;i++){ int num=sc.nextInt(); if(num<40) sum+=40; else sum+=num; } System.out.println(sum/5); } }
Main.java:2: error: class AverageScore is public, should be declared in a file named AverageScore.java public class AverageScore { ^ 1 error
s903787761
p00515
Java
import java.util.Scanner; public class aoj { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int sum = 0; for(int i=0;i<5;i++){ int a = sc.nextInt(); if(a<40){ a = 40; } sum += a; } System.out.println(sum/5); } }
Main.java:3: error: class aoj is public, should be declared in a file named aoj.java public class aoj { ^ 1 error
s402969476
p00515
Java
package SD; import java.util.Scanner; public class Z01 { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int[10]; int ave,sum = 0; for(int i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(score[i] < 4...
Main.java:3: error: class Z01 is public, should be declared in a file named Z01.java public class Z01 { ^ 1 error
s895271030
p00515
Java
import java.util.Scanner; public class Z01 { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int[10]; int ave,sum = 0; for(int i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(score[i] < 40){ scor...
Main.java:2: error: class Z01 is public, should be declared in a file named Z01.java public class Z01 { ^ 1 error
s830303347
p00515
Java
package AOJ0414; import java.util.Scanner; public class averagescore1 { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int [5]; int i, sum = 0; for(i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(sco...
Main.java:3: error: class averagescore1 is public, should be declared in a file named averagescore1.java public class averagescore1 { ^ 1 error
s379501310
p00515
Java
public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int [5]; int i, sum = 0; for(i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(score[i] < 40){ score[i] = 40; } } //System.out.printf("%d\n", s...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s582814871
p00515
Java
public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int [5]; int i, sum = 0; for(i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(score[i] < 40){ score[i] = 40; } } //System....
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s333600767
p00515
Java
import java.io.InputStreamReader; import java.util.Scanner; public class MAIN { public static void main(String[] args) { // TODO ????????????????????????????????????????????? InputStreamReader isr = new InputStreamReader(System.in); int ave,sum=0; Scanner sc = new Scanner(System.in); int[] data=new int[10];...
Main.java:6: error: class MAIN is public, should be declared in a file named MAIN.java public class MAIN { ^ 1 error
s416242249
p00515
Java
package Class01; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a[] = new int[5]; int sum = 0; for(int i = 0; i < 5; i++){ a[i] = sc.nextInt(); if(a[i] < 40){ a[i] = 40; } } for(int i = 0; i < 5; i++){...
Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s497769607
p00515
C
#include <stdio.h> int main(void){ int a[5] = {0}; int i; int avg=0; for(i=0; i<5; i++) { scanf("%d", &a[i]); if(a[i]<40) a[i]=40; avg += a[i]; } print("%d", avg/5); return 0; }
main.c: In function 'main': main.c:15:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 15 | print("%d", avg/5); | ^~~~~ | printf
s194867865
p00515
C
#include <stdio.h> int main(void) { int sum = 0; int i; for (i = 0; i < 5; i++){ int point; scanf("%d", &point); if (point < 40) point = 40; sum += point; } printf("%d\n", point / 5); }
main.c: In function 'main': main.c:15:24: error: 'point' undeclared (first use in this function); did you mean 'printf'? 15 | printf("%d\n", point / 5); | ^~~~~ | printf main.c:15:24: note: each undeclared identifier is reported only once for each fun...
s909808811
p00515
C
#include<stdio> int main(void) {int x,sum; for(i=0; i<5; i++){ scanf("%d",&x); if(x<40) x=40; sum=sum+x; } sum=sum/5; printf("%d",sum); return(0); }
main.c:1:9: fatal error: stdio: No such file or directory 1 | #include<stdio> | ^~~~~~~ compilation terminated.
s198059870
p00515
C
#include<stdio.h> int main(void) {int x,sum; for(i=0; i<5; i++){ scanf("%d",&x); if(x<40) x=40; sum=sum+x; } sum=sum/5; printf("%d",sum); return(0); }
main.c: In function 'main': main.c:4:7: error: 'i' undeclared (first use in this function) 4 | for(i=0; i<5; i++){ | ^ main.c:4:7: note: each undeclared identifier is reported only once for each function it appears in
s420226350
p00515
C
#include<stdio.h> int main(void) {int x,sum,i; for(i=0; i<5; i++){ scanf("%d",&x); if(x<=40) x=40; sum=sum+x; } sum=sum/5; printf("%d"\n,sum); return(0); }
main.c: In function 'main': main.c:13:14: error: stray '\' in program 13 | printf("%d"\n,sum); | ^ main.c:13:14: error: expected ')' before 'n' 13 | printf("%d"\n,sum); | ~ ^~ | )
s532342688
p00515
C
#include<stdio.h> int main() { int taro; int jiro; int sabu; int shiro; int hanako; int sum=0; scanf("%d",&taro); scanf("%d",&jiro); scanf("%d",&sabu); scanf("%d",&shiro); scanf("%d",&hanako); if(taro<40)sum+=40; else sum+=taro; if(jiro<40)sum+=40; else sum+=jiro; if(sabo<40)sum+=40; else sum+=sab...
main.c: In function 'main': main.c:22:12: error: 'sabo' undeclared (first use in this function); did you mean 'sabu'? 22 | if(sabo<40)sum+=40; | ^~~~ | sabu main.c:22:12: note: each undeclared identifier is reported only once for each function it appears in
s375505975
p00515
C
5.times{n=gets.to_i;s=s+n>40?n:40}p s/5
main.c:1:1: error: invalid suffix "times" on floating constant 1 | 5.times{n=gets.to_i;s=s+n>40?n:40}p s/5 | ^~~~~~~ main.c:1:1: error: expected identifier or '(' before numeric constant main.c:1:35: error: unknown type name 'p' 1 | 5.times{n=gets.to_i;s=s+n>40?n:40}p s/5 | ...
s790206974
p00515
C
#include <stdio.h> int main(void) { int scr[5]; int sum=0; int i; for(i=0;i<5;i++); scanf("%d",&scr[i]); for(i=0;i<5;i++) if(v[i]<40) v[i]=40; for(i=0;i<5;i++) sum+=v[i]; printf("%d\n",sum/5); return 0; }
main.c: In function 'main': main.c:12:8: error: 'v' undeclared (first use in this function) 12 | if(v[i]<40) | ^ main.c:12:8: note: each undeclared identifier is reported only once for each function it appears in
s001863204
p00515
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e); a=(a+b+c+d+e)/5; printf("%d\n",a[int]); // your code goes here return 0; }
main.c: In function 'main': main.c:8:25: error: expected expression before 'int' 8 | printf("%d\n",a[int]); | ^~~
s655283670
p00515
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e); a=(a+b+c+d+e)/5; int a; printf("%d\n",a); // your code goes here return 0; }
main.c: In function 'main': main.c:8:13: error: redeclaration of 'a' with no linkage 8 | int a; | ^ main.c:4:21: note: previous declaration of 'a' with type 'int' 4 | int a,b,c,d,e; | ^
s658118165
p00515
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e); if(a<40){ a=40; } else(b<40){ b=40; } else(c<40){ c=40; } else(d<40){ d=40; } else(e<40){ e=40; } a=(a+b+c+d+e)/5; int a; printf("%d\n",a); // your code goes here return 0; }
main.c: In function 'main': main.c:10:19: error: expected ';' before '{' token 10 | else(b<40){ | ^ | ; main.c:23:13: error: redeclaration of 'a' with no linkage 23 | int a; | ^ main.c:4:21: note: previous declaration of 'a' with ty...
s224897854
p00515
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e); if(a<40){ a=40; } else if(b<40){ b=40; } else if(c<40){ c=40; } else if(d<40){ d=40; } else if(e<40){ e=40; } a=(a+b+c+d+e)/5; int a; printf("%d\n",a); // your code goes here return 0; }
main.c: In function 'main': main.c:23:13: error: redeclaration of 'a' with no linkage 23 | int a; | ^ main.c:4:21: note: previous declaration of 'a' with type 'int' 4 | int a,b,c,d,e; | ^
s740676265
p00515
C
#include<stdio.h> int main(void) { int n[5]; int i; int avr = 0; for(i = 0;i < 5;i++) { scanf("%d".&n[i]); } for(i = 0;i < 5;i++) { if(n[i] < 40) { n[i] = 40; } } for(i = 0;i < 5;i++) { avr += n[i]; } avr = avr / 5; printf("%d".avr); return 0; }
main.c: In function 'main': main.c:10:28: error: expected identifier before '&' token 10 | scanf("%d".&n[i]); | ^ main.c:24:20: error: request for member 'avr' in something not a structure or union 24 | printf("%d".avr); | ^
s923150733
p00515
C
#include <stdio.h> int fun1(int data[], int n); int main() { int const n = 5; int i,data[n]; for(i=0; i<n; i++) { scanf("%d",&data[i]); if(data[i]<40) { data[i]=40; } } printf("%d",fun1(data,n)); return 0; } int fun2(int data[], int n) { int i,average = 0; for(i=0; i<n; i++) { average += d...
/usr/bin/ld: /tmp/cc4VZMEU.o: in function `main': main.c:(.text+0xd3): undefined reference to `fun1' collect2: error: ld returned 1 exit status
s710456827
p00515
C
#include <stdio.h> int main(void) { int a scanf("%d",&a); int b; scanf("%d",&b); int c; scanf("%d",&c); int d; scanf("%d",&d); int e; scanf("%d",&e); int s; s= a+b+c+d+e; printf("%d\n",s/5); return 0; }
main.c: In function 'main': main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 4 | scanf("%d",&a); | ^~~~~ main.c:4:21: error: 'a' undeclared (first use in this function) 4 | scanf("%d",&a); | ^ main.c:4:21: note: each undec...
s634557287
p00515
C++
#include <iostream> using namespace std; int main() { int T, J, S, Y, H; cin >> T >> J >> S >> y >> H; if(T<40){ T = 40; } if(J<40){ J = 40; } if(S<40){ S = 40; } if(Y<40){ Y = 40; } if(H<40){ H = 40; } cout << (I + J + S + Y + H)/5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:25: error: 'y' was not declared in this scope 6 | cin >> T >> J >> S >> y >> H; | ^ a.cc:24:11: error: 'I' was not declared in this scope 24 | cout << (I + J + S + Y + H)/5 << endl; | ^
s163769189
p00515
C++
i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);}
a.cc:1:1: error: 'i' does not name a type 1 | i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);} | ^ a.cc:1:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);} ...
s809663475
p00515
C++
i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);}
a.cc:1:1: error: 'i' does not name a type 1 | i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);} | ^ a.cc:1:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);} ...
s349431569
p00515
C++
#include <iostream> using namespace std; int main(){ int a[5],sum=0; for(int i=0;i<5++i){ cin>>a[i]; if(a[i]<40) a[i]; sum+=a[i]; } cout << sum/5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: lvalue required as increment operand 7 | for(int i=0;i<5++i){ | ^ a.cc:7:20: error: expected ';' before 'i' 7 | for(int i=0;i<5++i){ | ^ | ;
s290087927
p00515
C++
#include<stdio.h> int main(){ int s=0,x; for(inti=0;i<5;i++) {scanf("%d",&x);if(x<40)x=40;s+=x;} printf("%d\n",x/5); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'inti' was not declared in this scope; did you mean 'int'? 5 | for(inti=0;i<5;i++) | ^~~~ | int a.cc:5:12: error: 'i' was not declared in this scope 5 | for(inti=0;i<5;i++) | ^
s970178770
p00515
C++
#include<iostream> int main{ int a[5]; int b; for(int i; i<5; i++){ cin>>a[i]; b=b+a[i]; } cout<<b/5<<endl; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:3: error: expected primary-expression before 'int' 4 | int a[5]; | ^~~ a.cc:4:3: error: expected '}' before 'int' a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:6:3: error...
s222349430
p00515
C++
#include<iostream> using namespace std; int main{ int a[5]; int b; for(int i; i<5; i++){ cin>>a[i]; b=b+a[i]; } cout<<b/5<<endl; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:3: error: expected primary-expression before 'int' 4 | int a[5]; | ^~~ a.cc:4:3: error: expected '}' before 'int' a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:6:3: error...
s716602091
p00515
C++
#include<iostream> using namespace std; int main(){ int a[5]; int b=0; for(int i; i<5; i++){ cin>>a[i]; a[i]=a[i]/5 if(a[i]<8){ a[i]=8} b=b+a[i]; } cout<<b<<endl; }
a.cc: In function 'int main()': a.cc:9:16: error: expected ';' before 'if' 9 | a[i]=a[i]/5 | ^ | ; 10 | if(a[i]<8){ | ~~
s307968556
p00515
C++
#include<iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <queue> #include <string> #include <cmath> #include <set> #include <string.h> #include <functional> using namespace std; int main() { int a,b,c,d,e; cin>>a>>b>>c>>d>>e; if(a<40) a=40; if(b<...
a.cc: In function 'int main()': a.cc:30:12: error: 's' was not declared in this scope 30 | cout<<(s+b+c+d+e)/5<<endl; | ^
s171394557
p00515
C++
#include<stdio.h> int main(){ int data[10], i, sum, ave; for(i = 1, i <= 5, i++){ scanf("%d", &data[i]); if(data[i] < 40) data[i] = 40; sum += data[i]; } ave = sum / 5; printf("%d", ave); return 0; }
a.cc: In function 'int main()': a.cc:5:24: error: expected ';' before ')' token 5 | for(i = 1, i <= 5, i++){ | ^ | ; a.cc:11:19: error: expected ')' before ';' token 11 | printf("%d", ave); | ^ | ) a.cc:5:...
s197778060
p00515
C++
#include<stdio.h> int main(){ int data[10], i, sum = 0, ave; for(i = 1, i <= 5, i++){ scanf("%d", &data[i]); if(data[i] < 40) data[i] = 40; sum += data[i]; } ave = sum / 5; printf("%d", ave); return 0; }
a.cc: In function 'int main()': a.cc:5:24: error: expected ';' before ')' token 5 | for(i = 1, i <= 5, i++){ | ^ | ; a.cc:11:19: error: expected ')' before ';' token 11 | printf("%d", ave); | ^ | ) a.cc:5:...
s665802612
p00515
C++
JOI13-quest1.cpp Defines the entry point for the console application. #include <stdio.h> int main(void) { int temp, sum = 0; for (int i = 0; i 5; i++) { scanf(%d, &temp); if (temp = 40) { sum += temp; } else { sum += 40; } } printf(%dn, sum 5); return 0; }
a.cc:1:2: error: 'JOI13' does not name a type 1 | JOI13-quest1.cpp Defines the entry point for the console application. | ^~~~~ a.cc: In function 'int main()': a.cc:10:26: error: expected ';' before numeric constant 10 | for (int i = 0; i 5; i++) { | ^ ~ | ...
s847191004
p00515
C++
JOI13-quest1.cpp Defines the entry point for the console application. #include <stdio.h> int main(void) { int temp, sum = 0; for (int i = 0; i 5; i++) { scanf("%d", &temp); if (temp = 40) { sum += temp; } else { sum += 40; } } printf("%d\n" sum / 5); return 0; }
a.cc:1:2: error: 'JOI13' does not name a type 1 | JOI13-quest1.cpp Defines the entry point for the console application. | ^~~~~ a.cc: In function 'int main()': a.cc:8:26: error: expected ';' before numeric constant 8 | for (int i = 0; i 5; i++) { | ^ ~ | ...
s514599822
p00515
C++
//JOI13-quest1.cpp Defines the entry point for the console application. #include <stdio.h> int main(void) { int temp, sum = 0; for (int i = 0; i 5; i++) { scanf("%d", &temp); if (temp = 40) { sum += temp; } else { sum += 40; } } printf("%d\n" sum / 5); return 0; }
a.cc: In function 'int main()': a.cc:8:26: error: expected ';' before numeric constant 8 | for (int i = 0; i 5; i++) { | ^ ~ | ; a.cc:8:29: error: expected ')' before ';' token 8 | for (int i = 0; i 5; i++) { | ~ ...
s199364798
p00515
C++
//JOI13-quest1.cpp Defines the entry point for the console application. #include <stdio.h> int main(void) { int temp, sum = 0; for (int i = 0; i < 5; i++) { scanf("%d", &temp); if (temp == 40) { sum += temp; } else { sum += 40; } } printf("%d\n" sum / 5); return 0; }
a.cc: In function 'int main()': a.cc:19:22: error: expected ')' before 'sum' 19 | printf("%d\n" sum / 5); | ~ ^~~~ | )
s915312809
p00515
C++
#include<iostream> int a,s;main(){for(i=0;i<5;i++){std::cin>>a;s+=a;}printf("%d\n",s/5);}
a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int a,s;main(){for(i=0;i<5;i++){std::cin>>a;s+=a;}printf("%d\n",s/5);} | ^~~~ a.cc: In function 'int main()': a.cc:2:20: error: 'i' was not declared in this scope 2 | int a,s;main(){for(i=0;i<5;i++){std::cin>...
s892878322
p00515
C++
#include<bits/stdc++.h> int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);}
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);} | ^~~~ a.cc: In function 'int main()': a.cc:2:50: error: 'max' was not declared in this scope; did you mean 'std::max'? 2 | ...
s194250776
p00515
C++
#include<bits/stdc++.h> int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);}
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);} | ^~~~ a.cc: In function 'int main()': a.cc:2:50: error: 'max' was not declared in this scope; did you mean 'std::max'? 2 | ...
s182478333
p00515
C++
#include<bits/stdc++.h> int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}std::cout<<s/5<<endl;}
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}std::cout<<s/5<<endl;} | ^~~~ a.cc: In function 'int main()': a.cc:2:50: error: 'max' was not declared in this scope; did you mean 'std::max'? 2 ...
s242501805
p00515
C++
// Example program #include <iostream> using namespace std; int main() { int a; int b; int c; int d; int e; cin>>a>>b>>c>>d<<e; if(a<40){ a==40 }else{ a==a } if(b<40){ b==40 }else{ b==b } if(c<40){ c==40 }else{ c==c } ...
a.cc: In function 'int main()': a.cc:8:20: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 8 | cin>>a>>b>>c>>d<<e; | ~~~~~~~~~~~~~~~^~~ | | | | | int | ...
s918502558
p00515
C++
n,k=5;main(m){for(;k--;n+=m<40?40:m)scanf("%d",&m);k=!printf("%d\n",n/5);}
a.cc:1:1: error: 'n' does not name a type 1 | n,k=5;main(m){for(;k--;n+=m<40?40:m)scanf("%d",&m);k=!printf("%d\n",n/5);} | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | n,k=5;main(m){for(;k--;n+=m<40?40:m)scanf("%d",&m);k=!printf("%d\n",n/5);} | ...
s564944439
p00515
C++
5.times{n=gets.to_i;m+=n}p m/5
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5.times{n=gets.to_i;m+=n}p m/5 | ^~~~~~~ a.cc:1:26: error: 'p' does not name a type 1 | 5.times{n=gets.to_i;m+=n}p m/5 | ^
s323804801
p00515
C++
public class averagescore1 { public static void main(String[] args) { import java.util.Scanner; // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int [5]; int i, sum = 0; for(i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(score[i] < 40){ ...
a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class averagescore1 { | ^~~~~~
s751482866
p00515
C++
public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int[] score = new int [5]; int i, sum = 0; for(i = 0; i < 5; i++){ score[i] = sc.nextInt(); if(score[i] < 40){ score[i] = 40; } } //System....
a.cc:1:1: error: expected unqualified-id before 'public' 1 | public class Main { | ^~~~~~
s639098856
p00515
C++
#include<stdio.h> int main(void) { int a,b,c,d,e,x; scanf("%d %d %d %d %d",&a,&b,&c,&d,&e); x=(a+b+c+d+e)/5; printf("%d\n"x); return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: unable to find string literal operator 'operator""x' with 'const char [4]', 'long unsigned int' arguments 7 | printf("%d\n"x); | ^~~~~~~
s078637217
p00515
C++
ans = 0 for i in range(5): ans += max(40,int(input())) // 5 print(ans)
a.cc:1:1: error: 'ans' does not name a type 1 | ans = 0 | ^~~
s460024534
p00515
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int a[5],s=0; r(i,5)cin>>a[i]; r(i,5){ if(a[i]<40)s+=40; else s+=a[i] } cout<<s/5<<endl; }
a.cc: In function 'int main()': a.cc:9:13: error: expected ';' before '}' token 9 | else s+=a[i] | ^ | ; 10 | } | ~
s670443779
p00515
C++
#include<iostream> using namespace std; int main(){ for (i=1; i<=5; i++){ cin >> p; if(p < 40) { p = 40; } sum += p; } cout << sum / 5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:6: error: 'i' was not declared in this scope 4 | for (i=1; i<=5; i++){ | ^ a.cc:5:12: error: 'p' was not declared in this scope 5 | cin >> p; | ^ a.cc:7:4: error: 'sum' was not declared in this scope 7 | sum += p; | ^~~ a.cc:...
s887164615
p00515
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <functional> #include <algorithm> #include <string> #include <vector> #include <algorithm> #include <time.h> #include <stdlib.h> using namespace std; int main (void) { int a[5],con; for (int i = 0; i < 5; i++) { cin >> a; if (a < 40) { a...
a.cc: In function 'int main()': a.cc:20:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [5]') 20 | cin >> a; | ~~~ ^~ ~ | | | | | int [5] | ...
s407230532
p00515
C++
#include <iostream> using namespace std; int main () { int a[i],con; for (int i = 0; i < 5; i++) { cin >> a; if (a[i] < 40) { a[i] = 0; a[i] = 40; } con += a[i]; } cout << con / 5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: 'i' was not declared in this scope 7 | int a[i],con; | ^ a.cc:11:24: error: 'a' was not declared in this scope 11 | cin >> a; | ^
s764809255
p00515
C++
#include <iostream> using namespace std; int main () { int a[3000],con; for (int i = 0; i < 5; i++) { cin >> a; if (a[i] < 40) { a[i] = 0; a[i] = 40; } con += a[i]; } cout << con / 5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [3000]') 11 | cin >> a; | ~~~ ^~ ~ | | | | | int [3000] | ...
s128011113
p00515
C++
#include <iostream> using namespace std; int main () { int a[300],con; for (int i = 0; i < 5; i++) { cin >> a; if (a[i] < 40) { a[i] = 0; a[i] = 40; } con += a[i]; } cout << con / 5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [300]') 11 | cin >> a; | ~~~ ^~ ~ | | | | | int [300] | ...
s711236727
p00515
C++
#include<stdio.h> int main(void) { int a,b,c,d,e,f; scanf("%d %d %d %d %d",&a,&b,&c,&d,&f); x=(a+b+c+d+f)/5; printf("%d\n",x); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'x' was not declared in this scope 6 | x=(a+b+c+d+f)/5; | ^
s853774945
p00515
C++
#include<stdio.h> #include <iostream> #include<string> #include<algorithm> #include<sstream> #include<math.h> int main() { int a[5]; int ans=0; for (int i = 0; i < 5; i++) { cin >> a[i]; if (a[i] < 40)a[i] = 40; ans += a[i] / 5; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 11 | cin >> a[i]; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | e...
s859148647
p00515
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c, d, e,f; cin >> a, b, c, d, e; f =(a + b + c + d + e) / 5 cout << f<< endl; }
a.cc: In function 'int main()': a.cc:6:27: error: expected ';' before 'cout' 6 | f =(a + b + c + d + e) / 5 | ^ | ; 7 | cout << f<< endl; | ~~~~
s361440418
p00515
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e; cin>>a>>b>>c>>d>>e; if(a < 40) { a = 40 } if(b < 40) { b = 40 } if(c < 40) { c = 40 } if(d < 40) { d = 40 } if(e < 40) { e = 40 } cout << (a+b+c+d+e)/5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: expected ';' before '}' token 8 | a = 40 | ^ | ; 9 | } | ~ a.cc:11:13: error: expected ';' before '}' token 11 | b = 40 | ^ | ; 12 | } | ~ ...
s004598763
p00515
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,e; cin >>a>>b>>c>>d>>e; if(a<40) a=40; if(b<40) b=40; if(c<40) c=40; if(d<40) d=40; if(e<40) e=40; } cout<<(a+b+c+d+e)/5<<endl; return 0; }
a.cc:21:1: error: 'cout' does not name a type 21 | cout<<(a+b+c+d+e)/5<<endl; | ^~~~ a.cc:22:1: error: expected unqualified-id before 'return' 22 | return 0; | ^~~~~~ a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s891000490
p00515
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,e; cin >>a>>b>>c>>d>>e; if(a<40) a=40; if(b<40) b=40; if(c<40) c=40; if(d<40) d=40; if(e<40) e=40; } cout<<(a+b+c+d+e)/5<<endl; return 0; }
a.cc:21:1: error: 'cout' does not name a type 21 | cout<<(a+b+c+d+e)/5<<endl; | ^~~~ a.cc:22:1: error: expected unqualified-id before 'return' 22 | return 0; | ^~~~~~ a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s210043837
p00515
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,e; cin >>a>>b>>c>>d>>e; if(a<40) a=40; if(b<40) b=40; if(c<40) c=40; if(d<40) d=40; if(e<40) e=40; } cout<<(a+b+c+d+e)/5<<endl; return 0; }
a.cc:21:1: error: 'cout' does not name a type 21 | cout<<(a+b+c+d+e)/5<<endl; | ^~~~ a.cc:22:1: error: expected unqualified-id before 'return' 22 | return 0; | ^~~~~~ a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s521551388
p00515
C++
#include<iosteam> using namespase std; int main(){ int a,b,c,d,e; cin >> a >> b >> c >> d >> e; if( a<40 ){ a=40; } if( b<40 ){ b=40; } if( c<40 ){ c=40; } if( d<40 ){ d=40; } if( e<40 ){ e=40; } cout << (a+b+c+d+e)/5 << endl; return 0; }
a.cc:1:9: fatal error: iosteam: No such file or directory 1 | #include<iosteam> | ^~~~~~~~~ compilation terminated.
s749794728
p00515
C++
#include<iosteam> using namespase std; int main(){ int a,b,c,d,e; cin >> a >> b >> c >> d >> e; int m=0; if( a<40 ){ m += 40; } else{ m += a; } if( b<40 ){ m += 40; } else{ m += b; } if( c<40 ){ m += 40; } else{ m += c; } if( d<40 ){ m += 40; } else{ m += d; } if( e<40 ){ m += 40; }...
a.cc:1:9: fatal error: iosteam: No such file or directory 1 | #include<iosteam> | ^~~~~~~~~ compilation terminated.
s792467459
p00515
C++
#include<iostream> using namespase std; int main(){ int a,b,c,d,e; cin >> a >> b >> c >> d >> e; int m=0; if( a<40 ){ m += 40; } else{ m += a; } if( b<40 ){ m += 40; } else{ m += b; } if( c<40 ){ m += 40; } else{ m += c; } if( d<40 ){ m += 40; } else{ m += d; } if( e<40 ){ m += 40; ...
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> a >> b >> c >> d >> e; | ^~~ | std::cin In file included from...
s058583362
p00515
C++
#include<iostream> using namespase std; int main(){ int a,b,c,d,e; cin >> a >> b >> c >> d >> e; int m=0; if( a<40 ){ m += 40; } else{ m += a; } if( b<40 ){ m += 40; } else{ m += b; } if( c<40 ){ m += 40; } else{ m += c; } if( d<40 ){ m += 40; } else{ m += d; } if( e<40 ){ m += 40; ...
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> a >> b >> c >> d >> e; | ^~~ | std::cin In file included from...
s659828593
p00515
C++
#include<iostream> using namespace std; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; if (a < 40) { a=40 } if (b < 40) { b = 40 } if (c < 40) { c = 40 } if (d < 40) { d = 40 } if (e < 40) { e = 40 } cout << (a + b + c + d + e) / 5 << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: expected ';' before '}' token 8 | a=40 | ^ | ; 9 | } | ~ a.cc:11:23: error: expected ';' before '}' token 11 | b = 40 | ...
s602180914
p00515
C++
#include<iostream> using namespace std; int main(i){ int s[2]={0}; for(;i<6;i++){cin >> s[0]; s[1] += s[0]>39?s[0]:40; } cout << s[1]/5 << endl; return 0; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main(i){ | ^~~~ a.cc:3:10: error: 'i' was not declared in this scope 3 | int main(i){ | ^
s155563798
p00515
C++
#include<stdio.h> int main(i){ int a,sum=0; for(;i<6;i++){ scanf("%d",&a); sum += a<40?40:a; } printf("%d\n",sum/5); return 0; }
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(i){ | ^~~~ a.cc:2:10: error: 'i' was not declared in this scope 2 | int main(i){ | ^
s483043024
p00516
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.Integer.parseInt; public class P0593 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = ""; w...
Main.java:7: error: class P0593 is public, should be declared in a file named P0593.java public class P0593 { ^ 1 error
s202636511
p00516
Java
import java.util.Scanner; public class main { public static void main(String[] args){ Scanner S = new Scanner(System.in); int N = S.nextInt(); int M = S.nextInt(); int[] A = new int[N]; int[] A_num = new int[N]; int[] B = new int[M]; int answer = 0; for(int i = 0;i < N;i++){ A[i] = S.nextIn...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s403287714
p00516
Java
import java.util.Scanner; public class text { public static void main(String[] args){ Scanner S = new Scanner(System.in); int N = S.nextInt(); int M = S.nextInt(); int[] A = new int[N]; int[] A_num = new int[N]; int[] B = new int[M]; int a = 0; for(int i = 0;i < N;i++){ A[i] = S.nextInt(); ...
Main.java:3: error: class text is public, should be declared in a file named text.java public class text { ^ 1 error
s865265906
p00516
Java
package text; import java.util.Scanner; public class main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] A = new int[n]; int[] a_monney= new int[n]; int[] b = new int[m]; int answer = 0; for(int i = 0;i < n;i++...
Main.java:5: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s237405790
p00516
Java
import java.util.Scanner; public class main { public static void main(String[] args){ Scanner s = new Scanner(System.in); int n = s.nextInt(); int m = s.nextInt(); int[] A = new int[n]; int[] a_= new int[n]; int[] b = new int[m]; int answ...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ Main.java:24: error: variable s is already defined in method main(String[]) int s = b[i]; ^ 2 errors
s195549156
p00516
Java
import java.util.*; public class main { public static void main(String[] args){ Scanner s = new Scanner(System.in); int n = s.nextInt(); int m = s.nextInt(); int[] A = new int[n]; int[] a_= new int[n]; int[] b = new int[m]; int answer = 0...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ Main.java:24: error: variable s is already defined in method main(String[]) int s = b[i]; ^ 2 errors
s560494940
p00516
Java
package kadai_2; import java.util.*; public class vote { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int kyougi[] = new int[N]; int shinsain[] = new int[M]; int vote[] = new int[N]; ...
Main.java:5: error: class vote is public, should be declared in a file named vote.java public class vote { ^ 1 error
s000244786
p00516
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Arrays; class Main{ static final PrintWriter out=new PrintWriter(System.out); public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine...
Main.java:32: error: cannot find symbol out.prntln(i+1); ^ symbol: method prntln(int) location: variable out of type PrintWriter 1 error
s322661809
p00516
Java
public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n,m; n = sc.nextInt(); m = sc.nextInt(); int a[] = new int[n]; int b[] = new int[m]; int vote[] = new int[n]; int max = 0; int answer = 0; for(int i=0;i<n;i++){ a[i] = sc.nextInt(); } for(int...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s779608860
p00516
Java
package Spring; import java.util.*; public class Main1 { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[] = new int[n];//??¶???????????¨ int b[] = new int[m];//???????????? int cnt[] = new int[n];//???????????? int max = 0, i...
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s443822890
p00516
Java
import java.util.*; public class Main1 { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[] = new int[n];//??¶???????????¨ int b[] = new int[m];//???????????? int cnt[] = new int[n];//???????????? int max = 0, idx = 0;//?????§?...
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error