row_id large_string | sid large_string | submission_id large_string | pid large_string | problem_id large_string | uid large_string | user_id large_string | date int64 | date_iso timestamp[ms] | source_name large_string | code large_string | compilemessage large_string | compile_status large_string | exit_code int64 | javac_version large_string | category large_string | label_status large_string | taxonomy_version large_string | session_id large_string | session_6h large_string | source large_string | original_status large_string | code_size int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
v2_s146159227 | s146159227 | s146159227 | p02784 | p02784 | u753092134 | u753092134 | 1,584,388,238 | 2020-03-16T19:50:38 | test.java | import java.util.Scanner;
import java.lang.Math;
public class test {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
long h=scan.nextInt();
int n=scan.nextInt();
int []arr=[n];
for (int i=0;i<n;i++){
arr[i]=scan.nextInt();
h-=arr[i]; ... | test.java:8: error: illegal start of expression
int []arr=[n];
^
test.java:8: error: not a statement
int []arr=[n];
^
test.java:8: error: ';' expected
int []arr=[n];
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u753092134|p02784|0 | u753092134|p02784|0 | codenet | Compile Error | 469 | |
v2_s680031849 | s680031849 | s680031849 | p02784 | p02784 | u761516097 | u761516097 | 1,580,114,670 | 2020-01-27T08:44:30 | Main.java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] line1 = sc.nextLine();
String[] line2 = sc.nextLine();
long H = Long.parseLong(line1[0]);
long N = Long.parseLong(line1[1]);
sc.close... | Main.java:7: error: incompatible types: String cannot be converted to String[]
String[] line1 = sc.nextLine();
^
Main.java:8: error: incompatible types: String cannot be converted to String[]
String[] line2 = sc.nextLine();
^
2 erro... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u761516097|p02784|0 | u761516097|p02784|0 | codenet | Compile Error | 568 | |
v2_s538017689 | s538017689 | s538017689 | p02784 | p02784 | u814208069 | u814208069 | 1,590,189,806 | 2020-05-22T23:23:26 | Main.java | public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int Hp = sc.nextInt();
int N = sc.nextInt();
for(int i = 0; i < N; i++){
int attack = sc.nextInt();
Hp = Hp - attack;
}
if(Hp > 0){
System.out.println("No");
}else{
S... | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u814208069|p02784|0 | u814208069|p02784|0 | codenet | Compile Error | 357 | |
v2_s146026478 | s146026478 | s146026478 | p02784 | p02784 | u820895990 | u820895990 | 1,580,072,507 | 2020-01-26T21:01:47 | Main.java | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int h=sc.nextInt();
int n=sc.nextInt();
int[] a=new int[n];
int sum=0;
for(int i=0;i<n;++i){
a[i]=sc.nextInt();
sum+=a[i];
}
if(sum>=h){
System.out.prinnt... | Main.java:14: error: cannot find symbol
System.out.prinntln("Yes");
^
symbol: method prinntln(String)
location: variable out of type PrintStream
Main.java:17: error: cannot find symbol
System.out.prinntln("No");
^
symbol: method prinntln(String)
location: variable... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u820895990|p02784|0 | u820895990|p02784|0 | codenet | Compile Error | 392 | |
v2_s011313171 | s011313171 | s011313171 | p02784 | p02784 | u825262731 | u825262731 | 1,580,069,920 | 2020-01-26T20:18:40 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in):
int h = sc.nextInt();
int n = sc.nextInt();
long sum=0;
for(int i=0;i<n;i++){
sum=sum+sc.nextInt();
}
if(sum<h){
System.out.println("Yes");
}
else{
System.... | Main.java:4: error: ';' expected
Scanner sc = new Scanner(System.in):
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u825262731|p02784|0 | u825262731|p02784|0 | codenet | Compile Error | 350 | |
v2_s040034978 | s040034978 | s040034978 | p02784 | p02784 | u825262731 | u825262731 | 1,580,069,989 | 2020-01-26T20:19:49 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in):
int h = sc.nextInt();
int n = sc.nextInt();
long sum=0;
for(int i=0;i<n;i++){
sum=sum+sc.nextInt();
}
if(sum<h){
System.out.println("No");
}
else{
System.o... | Main.java:4: error: ';' expected
Scanner sc = new Scanner(System.in):
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u825262731|p02784|0 | u825262731|p02784|0 | codenet | Compile Error | 350 | |
v2_s525516908 | s525516908 | s525516908 | p02784 | p02784 | u842363198 | u842363198 | 1,583,515,274 | 2020-03-06T17:21:14 | Main.java | import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
try {
//local変数
String jadge = "Yes";
int atack;
//標準入力受け取り
Scanner scan = new Scanner(System.in);
List<Integer> strs = new arrayList<>();
... | Main.java:16: error: cannot find symbol
List<Integer> strs = new arrayList<>();
^
symbol: class List
location: class Main
Main.java:16: error: cannot find symbol
List<Integer> strs = new arrayList<>();
^
symbol: class arrayList
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u842363198|p02784|0 | u842363198|p02784|0 | codenet | Compile Error | 685 | |
v2_s810701715 | s810701715 | s810701715 | p02784 | p02784 | u860874998 | u860874998 | 1,589,575,678 | 2020-05-15T20:47:58 | Main.java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int N = sc.nextInt();
int[] A = new int[N];
int sum=0;
for(int i=0;i<N;i++){
S[i]=sc.nextInt();
sum=sum+S[i];
}
if(H>=sum){
System.out.pr... | Main.java:12: error: cannot find symbol
S[i]=sc.nextInt();
^
symbol: variable S
location: class Main
Main.java:13: error: cannot find symbol
sum=sum+S[i];
^
symbol: variable S
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u860874998|p02784|0 | u860874998|p02784|0 | codenet | Compile Error | 386 | |
v2_s259608914 | s259608914 | s259608914 | p02784 | p02784 | u944388906 | u944388906 | 1,580,069,982 | 2020-01-26T20:19:42 | Main.java | import java.util.*;
public class Main
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
int i=0;
for(i=0;i<t;i++)
sum += sc.nextInt();
if(sum < n)
System.out.println("No");
else
... | Main.java:11: error: cannot find symbol
sum += sc.nextInt();
^
symbol: variable sum
location: class Main
Main.java:12: error: cannot find symbol
if(sum < n)
^
symbol: variable sum
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u944388906|p02784|0 | u944388906|p02784|0 | codenet | Compile Error | 359 | |
v2_s205068524 | s205068524 | s205068524 | p02785 | p02785 | u021490137 | u021490137 | 1,580,073,598 | 2020-01-26T21:19:58 | Main.java |
import java.util.*;
public class Main {
public static void main(String[] args){
int[] a=new int[200000];
Scanner sc = new Scanner(System.in);
int b = sc.nextInt();
int c = sc.nextInt();
long count=0;
int max=0;
int num=0;
int i;
for(i=... | Main.java:18: error: variable i is already defined in method main(String[])
for(int i=0;i<b;i++){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u021490137|p02785|0 | u021490137|p02785|0 | codenet | Compile Error | 838 | |
v2_s499319660 | s499319660 | s499319660 | p02785 | p02785 | u047630381 | u047630381 | 1,580,074,718 | 2020-01-26T21:38:38 | Main.java | import java.util.Scanner;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
ArrayList<Integer> H = new ArrayList<>();
lo... | Main.java:24: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u047630381|p02785|0 | u047630381|p02785|0 | codenet | Compile Error | 542 | |
v2_s228013767 | s228013767 | s228013767 | p02785 | p02785 | u062736195 | u062736195 | 1,582,140,047 | 2020-02-19T19:20:47 | Main.java | import java.util.Scanner;
import java.util.Arrays.
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
long sum =0;
long[] HP = new long[N];
for(int i=0; i<N; i++)
HP[i] = sc.nextLong();
if(K >... | Main.java:2: error: <identifier> expected
import java.util.Arrays.
^
Main.java:17: error: ';' expected
for(int i = 0; i<N, i++){
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u062736195|p02785|0 | u062736195|p02785|0 | codenet | Compile Error | 624 | |
v2_s975566986 | s975566986 | s975566986 | p02785 | p02785 | u062736195 | u062736195 | 1,582,140,083 | 2020-02-19T19:21:23 | Main.java | import java.util.Scanner;
import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
long sum =0;
long[] HP = new long[N];
for(int i=0; i<N; i++)
HP[i] = sc.nextLong();
if(K >... | Main.java:16: error: cannot find symbol
Array.sort(HP); //HP??????????????K???
^
symbol: variable Array
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u062736195|p02785|0 | u062736195|p02785|0 | codenet | Compile Error | 625 | |
v2_s691913746 | s691913746 | s691913746 | p02785 | p02785 | u062736195 | u062736195 | 1,582,141,139 | 2020-02-19T19:38:59 | Main.java | import java.util.Scanner;
import java.util.Arrays;
import java.util.Collections;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
long sum =0;
long[] HP = new long[N];
for(int i=0; i<N; i++)
HP[i] = ... | Main.java:17: error: no suitable method found for sort(long[],Comparator<Object>)
Arrays.sort(HP, Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: long
upper b... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u062736195|p02785|0 | u062736195|p02785|0 | codenet | Compile Error | 557 | |
v2_s160747128 | s160747128 | s160747128 | p02785 | p02785 | u095434379 | u095434379 | 1,581,288,843 | 2020-02-09T22:54:03 | Main.java | import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int k = scanner.nex... | Main.java:20: error: method comparingInt in interface Comparator<T#2> cannot be applied to given types;
System.out.println(list.stream().sorted(Comparator.comparingInt()).collect(Collectors.toList()).subList(0, n - k).stream().mapToInt(m -> m).sum());
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u095434379|p02785|0 | u095434379|p02785|0 | codenet | Compile Error | 745 | |
v2_s717497141 | s717497141 | s717497141 | p02785 | p02785 | u101079650 | u101079650 | 1,582,961,142 | 2020-02-29T07:25:42 | Main.java |
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long k = sc.nextLong();
long[] a = new long[n];
for (int i = 0; i < a.length; i++) {
a[i] = sc.nextInt();
... | Main.java:11: error: incompatible types: possible lossy conversion from long to int
long[] a = new long[n];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u101079650|p02785|0 | u101079650|p02785|0 | codenet | Compile Error | 491 | |
v2_s420251634 | s420251634 | s420251634 | p02785 | p02785 | u154928783 | u154928783 | 1,581,197,124 | 2020-02-08T21:25:24 | Main.java | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int monsterNum = sc.nextInt();
int ultimate = sc.nextInt();
List<Integer> monsterList = new ArrayList<>();
for(int i = 0;i < monsterNum; i++ ) {
monsterList.add(sc.nextInt());
}
monsterList.sort((x,y) -> y.compareTo(x));
... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:18: error: reached end of file while parsing
System.out.println(anser);
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u154928783|p02785|0 | u154928783|p02785|0 | codenet | Compile Error | 502 | |
v2_s622077734 | s622077734 | s622077734 | p02785 | p02785 | u176982046 | u176982046 | 1,595,083,251 | 2020-07-18T14:40:51 | Main.java | class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] mns = new int[n];
int k = sc.nextInt();
Long ans = 0;
for(int i=0;i<n;i++){
mns[i] = sc.nextInt();
}
Arrays.sort(mns);
for(int j=0;j<k;j++){
mns[n - j - 1] = 0;
}
fo... | 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
Main.java:8: error: incompatible types: i... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u176982046|p02785|0 | u176982046|p02785|0 | codenet | Compile Error | 397 | |
v2_s067170587 | s067170587 | s067170587 | p02785 | p02785 | u178329956 | u178329956 | 1,580,352,192 | 2020-01-30T02:43:12 | Main.java | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
int h = s.nextInt();
int k = s.nextInt();
int a[] = new int[h];
int sum=0;
for(int i = 0; i <= h ;i++)
{
a[i] = s.nextInt();
... | Main.java:16: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(a, Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: int
u... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u178329956|p02785|0 | u178329956|p02785|0 | codenet | Compile Error | 533 | |
v2_s009207525 | s009207525 | s009207525 | p02785 | p02785 | u178329956 | u178329956 | 1,580,767,086 | 2020-02-03T21:58:06 | Main.java | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
long h = s.nextLong();
long k = s.nextLong();
Integer a[] = new Integer[h];
long sum=0;
for(int i = 0; i <= h-1 ;i++)
{
a[i] = s.ne... | Main.java:10: error: incompatible types: possible lossy conversion from long to int
Integer a[] = new Integer[h];
^
Main.java:18: error: incompatible types: possible lossy conversion from long to int
for(int j = k; j<h; j++ )
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u178329956|p02785|2 | u178329956|p02785|2 | codenet | Compile Error | 526 | |
v2_s307623006 | s307623006 | s307623006 | p02785 | p02785 | u178329956 | u178329956 | 1,580,767,196 | 2020-02-03T21:59:56 | Main.java | mport java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
int h = s.nextInt();
int k = s.nextInt();
Integer a[] = new Integer[h];
long sum=0;
for(int i = 0; i <= h-1 ;i++)
{
a[i] = s.nextInt... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u178329956|p02785|2 | u178329956|p02785|2 | codenet | Compile Error | 521 | |
v2_s870504056 | s870504056 | s870504056 | p02785 | p02785 | u203103469 | u203103469 | 1,580,072,847 | 2020-01-26T21:07:27 | Main.java | import java.io.*;
import java.math.*;
class Main
{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n,k,i=0;
BigInteger s=new BigInteger("0");
int a[]=new int[200000];
String[] strs=br.readLine().trim().split("\\s+"... | Main.java:22: error: cannot find symbol
Arrays.sort(a);
^
symbol: variable Arrays
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u203103469|p02785|0 | u203103469|p02785|0 | codenet | Compile Error | 729 | |
v2_s678152632 | s678152632 | s678152632 | p02785 | p02785 | u207845630 | u207845630 | 1,588,911,327 | 2020-05-08T04:15:27 | Main.java | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
long[] H = new long[N];
long ans = 0;
for(int i = 0;i < N;i++){
H[i] = sc.nextLong();
}
H.sort();
for(int i = 0;i < K;i++){
H[N - 1 - i... | Main.java:12: error: cannot find symbol
H.sort();
^
symbol: method sort()
location: variable H of type long[]
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u207845630|p02785|0 | u207845630|p02785|0 | codenet | Compile Error | 410 | |
v2_s614717849 | s614717849 | s614717849 | p02785 | p02785 | u212397344 | u212397344 | 1,585,345,997 | 2020-03-27T21:53:17 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long K = sc.nextLong();
ArrayList<Integer> hp = new ArrayList<>();
long sum = 0;
for(int i=0; i<N; i++){
long tmp = sc.nextLong();
hp.add(tmp);
s... | Main.java:26: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u212397344|p02785|0 | u212397344|p02785|0 | codenet | Compile Error | 568 | |
v2_s593960068 | s593960068 | s593960068 | p02785 | p02785 | u212397344 | u212397344 | 1,585,346,024 | 2020-03-27T21:53:44 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long K = sc.nextLong();
ArrayList<Integer> hp = new ArrayList<>();
long sum = 0;
for(int i=0; i<N; i++){
long tmp = sc.nextLong();
hp.add(tmp);
s... | Main.java:11: error: incompatible types: long cannot be converted to Integer
hp.add(tmp);
^
Main.java:17: error: array required, but ArrayList<Integer> found
long tmpHp = hp[i] - K;
^
Main.java:21: error: array required, but ArrayList<Integer> found
sum -= hp[... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u212397344|p02785|0 | u212397344|p02785|0 | codenet | Compile Error | 571 | |
v2_s250886682 | s250886682 | s250886682 | p02785 | p02785 | u212397344 | u212397344 | 1,585,346,315 | 2020-03-27T21:58:35 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextLong();
int[] hp = new int[N];
long sum = 0;
for(int i=0; i<N; i++){
int tmp = sc.nextLong();
hp.add(tmp);
}
Arrays.sort(hp);
... | Main.java:14: error: not a statement
for(int =0; i<N -K; i++){
^
Main.java:14: error: ';' expected
for(int =0; i<N -K; i++){
^
Main.java:14: error: illegal start of expression
for(int =0; i<N -K; i++){
^
Main.java:14: error: not a statement
for(int =0; i<N -K; i++){
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u212397344|p02785|0 | u212397344|p02785|0 | codenet | Compile Error | 408 | |
v2_s416102280 | s416102280 | s416102280 | p02785 | p02785 | u212397344 | u212397344 | 1,585,346,341 | 2020-03-27T21:59:01 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextLong();
int[] hp = new int[N];
long sum = 0;
for(int i=0; i<N; i++){
int tmp = sc.nextLong();
hp.add(tmp);
}
Arrays.sort(hp);
... | Main.java:6: error: incompatible types: possible lossy conversion from long to int
int K = sc.nextLong();
^
Main.java:10: error: incompatible types: possible lossy conversion from long to int
int tmp = sc.nextLong();
^
Main.java:11: error: cannot find symbol
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u212397344|p02785|0 | u212397344|p02785|0 | codenet | Compile Error | 409 | |
v2_s588443485 | s588443485 | s588443485 | p02785 | p02785 | u212397344 | u212397344 | 1,585,346,382 | 2020-03-27T21:59:42 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int[] hp = new int[N];
long sum = 0;
for(int i=0; i<N; i++){
int tmp = sc.nextInt();
hp.add(tmp);
}
Arrays.sort(hp);
... | Main.java:11: error: cannot find symbol
hp.add(tmp);
^
symbol: method add(int)
location: variable hp of type int[]
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u212397344|p02785|0 | u212397344|p02785|0 | codenet | Compile Error | 409 | |
v2_s199392907 | s199392907 | s199392907 | p02785 | p02785 | u218740431 | u218740431 | 1,580,597,517 | 2020-02-01T22:51:57 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
Long [] in = new int [a];
for(int i=0;i<a;i++){in[i] = sc.nextInt();
}
Arrays.sort(in);
Long c = 0... | Main.java:7: error: incompatible types: int[] cannot be converted to Long[]
Long [] in = new int [a];
^
Main.java:8: error: incompatible types: int cannot be converted to Long
for(int i=0;i<a;i++){in[i] = sc.nextInt();
^
Main.java:11: error: incomp... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02785|0 | u218740431|p02785|0 | codenet | Compile Error | 400 | |
v2_s991638175 | s991638175 | s991638175 | p02785 | p02785 | u218740431 | u218740431 | 1,580,597,606 | 2020-02-01T22:53:26 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Long a = sc.nextLong();
Long b = sc.nextLong();
Long [] in = new Long [a];
for(int i=0;i<a;i++){in[i] = sc.nextInt();
}
Arrays.sort(in);
Long ... | Main.java:7: error: incompatible types: Long cannot be converted to int
Long [] in = new Long [a];
^
Main.java:8: error: incompatible types: int cannot be converted to Long
for(int i=0;i<a;i++){in[i] = sc.nextInt();
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02785|0 | u218740431|p02785|0 | codenet | Compile Error | 407 | |
v2_s509384019 | s509384019 | s509384019 | p02785 | p02785 | u218740431 | u218740431 | 1,580,597,660 | 2020-02-01T22:54:20 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Long a = sc.nextLong();
Long b = sc.nextLong();
Long [] in = new Long [a];
for(int i=0;i<a;i++){in[i] = sc.nextLong();
}
Arrays.sort(in);
Long... | Main.java:7: error: incompatible types: Long cannot be converted to int
Long [] in = new Long [a];
^
Main.java:12: error: incompatible types: int cannot be converted to Long
for(Long i=0;i<a-b;i++){c+=in[i];}
^
Main.java:12: error: incompatible types: Long can... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02785|0 | u218740431|p02785|0 | codenet | Compile Error | 409 | |
v2_s680823765 | s680823765 | s680823765 | p02785 | p02785 | u218740431 | u218740431 | 1,580,597,793 | 2020-02-01T22:56:33 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextLong();
Long [] in = new Long [a];
for(int i=0;i<a;i++){in[i] = sc.nextLong();
}
Arrays.sort(in);
Long c ... | Main.java:6: error: incompatible types: possible lossy conversion from long to int
int b = sc.nextLong();
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02785|0 | u218740431|p02785|0 | codenet | Compile Error | 413 | |
v2_s552767072 | s552767072 | s552767072 | p02785 | p02785 | u222822036 | u222822036 | 1,598,995,886 | 2020-09-01T21:31:26 | Main.java | import java.util.*; import java.io.*; import java.math.*;
public class Main{
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = ne... | Main.java:78: error: cannot find symbol
for(int i = K; i < N; i++){
^
symbol: variable N
location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u222822036|p02785|0 | u222822036|p02785|0 | codenet | Compile Error | 3,110 | |
v2_s468301171 | s468301171 | s468301171 | p02785 | p02785 | u222822036 | u222822036 | 1,598,995,938 | 2020-09-01T21:32:18 | Main.java | import java.util.*; import java.io.*; import java.math.*;
public class Main{
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = ne... | Main.java:78: error: cannot find symbol
for(int i = K; i < H; i++){
^
symbol: variable H
location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u222822036|p02785|0 | u222822036|p02785|0 | codenet | Compile Error | 3,110 | |
v2_s645471713 | s645471713 | s645471713 | p02785 | p02785 | u225897163 | u225897163 | 1,580,073,044 | 2020-01-26T21:10:44 | FennecMonster.java | import java.io.*;
public class FennecMonster
{
public static void main(String [] args)
{
Scanner sc= new Scanner(System.in);
System.out.println("Enter the no. of Monsters");
int n= sc.nextInt();
int h= new int [n];
System.out.println("Enter the no. of special moves");
int k= sc.nextInt()... | FennecMonster.java:32: error: ';' expected
int temp= h[j]
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u225897163|p02785|0 | u225897163|p02785|0 | codenet | Compile Error | 1,051 | |
v2_s905654816 | s905654816 | s905654816 | p02785 | p02785 | u314087694 | u314087694 | 1,580,070,857 | 2020-01-26T20:34:17 | Main.java | import java.util.Scanner;
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
long n=scan.nextLong();
long k=scan.nextLong();
long[] h=new long[n];
long i=0;
for(i=0;i<n;i++){
h[i]=scan.nextLong();
}
Arrays.sort(h);
long sum=0;
if(n>k){
... | Main.java:9: error: incompatible types: possible lossy conversion from long to int
long[] h=new long[n];
^
Main.java:13: error: incompatible types: possible lossy conversion from long to int
h[i]=scan.nextLong();
^
Main.java:22: error: incompatible types: possible lossy conversion from long ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u314087694|p02785|0 | u314087694|p02785|0 | codenet | Compile Error | 436 | |
v2_s005777390 | s005777390 | s005777390 | p02785 | p02785 | u379464460 | u379464460 | 1,585,441,267 | 2020-03-29T00:21:07 | FennecMonster.java | import java.util.*;
public class FennecMonster{
public static void main(String arg[]){
Scanner sc=new Scanner(System.in);
long n=sc.nextLong();
long k=sc.nextLong();
int a[]=new int[n];
long sum =0;
for(int i=0;i<n;i++)
a[i]=sc.nextInt();
Arrays.sort(a);
if(n < k)
System.out.println("0");
els... | FennecMonster.java:8: error: incompatible types: possible lossy conversion from long to int
int a[]=new int[n];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u379464460|p02785|0 | u379464460|p02785|0 | codenet | Compile Error | 400 | |
v2_s456504856 | s456504856 | s456504856 | p02785 | p02785 | u429342487 | u429342487 | 1,592,400,317 | 2020-06-17T13:25:17 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int h[] = new int[N];
int th = 0;
int maxh = 0;
int ans = 0;
for(int i=1; i<=N-1; i++){
int h =... | Main.java:14: error: variable h is already defined in method main(String[])
int h =sc.nextInt();
^
Main.java:15: error: array required, but int found
th = th+h[i];
^
Main.java:16: error: array required, but int found
maxh = Math.max(maxh,h[i]);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u429342487|p02785|0 | u429342487|p02785|0 | codenet | Compile Error | 468 | |
v2_s915019523 | s915019523 | s915019523 | p02785 | p02785 | u445860050 | u445860050 | 1,597,715,768 | 2020-08-18T01:56:08 | Program.java | import java.util.*;
public class Program{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
n = scan.nextInt();
t = scan.nextInt();
int [] ar = new int[n + 1];
for (int i = 1 ; i <= n ; i++)
ar[i] = scan.nextInt();
Arrays.sort(ar);
int an... | Program.java:5: error: cannot find symbol
n = scan.nextInt();
^
symbol: variable n
location: class Program
Program.java:6: error: cannot find symbol
t = scan.nextInt();
^
symbol: variable t
location: class Program
Program.java:7: error: cannot find symbol
int [] ar = new int[n ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u445860050|p02785|0 | u445860050|p02785|0 | codenet | Compile Error | 436 | |
v2_s952102974 | s952102974 | s952102974 | p02785 | p02785 | u445860050 | u445860050 | 1,597,715,800 | 2020-08-18T01:56:40 | Program.java | import java.util.*;
public class Program{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int t = scan.nextInt();
int [] ar = new int[n + 1];
for (int i = 1 ; i <= n ; i++)
ar[i] = scan.nextInt();
Arrays.sort(ar);
... | Program.java:12: error: cannot find symbol
for (int i = 1 ; i <= max(0,n-t) ; i++)
^
symbol: method max(int,int)
location: class Program
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u445860050|p02785|0 | u445860050|p02785|0 | codenet | Compile Error | 445 | |
v2_s772698470 | s772698470 | s772698470 | p02785 | p02785 | u456177179 | u456177179 | 1,580,072,955 | 2020-01-26T21:09:15 | Main.java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
int count = 0;
//number of enemies
int N;
//special attack
int S;
Scanner scanner = new Scanner(System.in);
H = scanner.nextInt();
S = scanner.nextInt();
//list of enemies HP
int u[] = new int[9];
for(int i = 0; i<9; i++){... | Main.java:14: error: cannot find symbol
H = scanner.nextInt();
^
symbol: variable H
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u456177179|p02785|0 | u456177179|p02785|0 | codenet | Compile Error | 602 | |
v2_s827855108 | s827855108 | s827855108 | p02785 | p02785 | u481109482 | u481109482 | 1,581,668,470 | 2020-02-14T08:21:10 | Main.java | public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
//------------------------------------------------------------
int n = sc.nextInt();
int k = sc.nextInt();
int[] monsters =new int[n];
for (int i=0;i<n;i++){
monsters[i]=sc.nextInt();
}
Arrays.sort(monst... | 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
Main.java:11: error: cannot find symbol
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u481109482|p02785|1 | u481109482|p02785|1 | codenet | Compile Error | 551 | |
v2_s916994354 | s916994354 | s916994354 | p02785 | p02785 | u487433273 | u487433273 | 1,580,381,519 | 2020-01-30T10:51:59 | Main.java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
long[] H = new long[N];
for(int i=0;i<N;i++) H[i] = sc.nextLong();
long ans = 0;
Arrays.sort(H);
for(int i=0;i<N-K;i++)
{
sum+=... | Main.java:13: error: cannot find symbol
sum+=H[i];
^
symbol: variable sum
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u487433273|p02785|0 | u487433273|p02785|0 | codenet | Compile Error | 363 | |
v2_s652879949 | s652879949 | s652879949 | p02785 | p02785 | u520067800 | u520067800 | 1,584,629,927 | 2020-03-19T14:58:47 | Main.java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[]args) {
try(Scanner scan = new Scanner(System.in)){
int N = scan.nextInt();
int K = scan.nextInt();
int[] H = new int[N];
//ArrayList<Integer> hp = new ArrayList<Integer>();
for(int i =... | Main.java:34: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u520067800|p02785|0 | u520067800|p02785|0 | codenet | Compile Error | 650 | |
v2_s439276123 | s439276123 | s439276123 | p02785 | p02785 | u547671064 | u547671064 | 1,583,995,544 | 2020-03-12T06:45:44 | Main.java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
long N =sc.nextInt();
long K =sc.nextInt();
if(N<=K){System.out.println(0);}
else{
long M[] =new long[N];
for(int i=0;i<N;i++){
M[i]=sc.nextLong();}
Arrays.sort(M);
... | Main.java:9: error: incompatible types: possible lossy conversion from long to int
long M[] =new long[N];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u547671064|p02785|0 | u547671064|p02785|0 | codenet | Compile Error | 414 | |
v2_s189740195 | s189740195 | s189740195 | p02785 | p02785 | u547671064 | u547671064 | 1,583,995,624 | 2020-03-12T06:47:04 | Main.java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
long N =sc.nextLong();
long K =sc.nextLong();
if(N<=K){System.out.println(0);}
else{
long M[] =new long[N];
for(int i=0;i<N;i++){
M[i]=sc.nextLong();}
Arrays.sort(M)... | Main.java:9: error: incompatible types: possible lossy conversion from long to int
long M[] =new long[N];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u547671064|p02785|0 | u547671064|p02785|0 | codenet | Compile Error | 416 | |
v2_s177529127 | s177529127 | s177529127 | p02785 | p02785 | u576434377 | u576434377 | 1,586,037,369 | 2020-04-04T21:56:09 | Main.java | import com.sun.tools.javac.util.ArrayUtils;
import java.util.*;
import java.util.Map.*;
import java.io.*;
import java.util.StringTokenizer;
import java.util.Comparator;
import java.util.stream.Collectors;
import java.util.stream.LongStream;
public class Main {
public static void main(String[] args) {
Fas... | Main.java:1: error: package com.sun.tools.javac.util is not visible
import com.sun.tools.javac.util.ArrayUtils;
^
(package com.sun.tools.javac.util is declared in module jdk.compiler, which does not export it to the unnamed module)
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u576434377|p02785|0 | u576434377|p02785|0 | codenet | Compile Error | 7,866 | |
v2_s471207340 | s471207340 | s471207340 | p02785 | p02785 | u615880092 | u615880092 | 1,580,556,980 | 2020-02-01T11:36:20 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 敵の数
int n = sc.nextInt();
// 必殺技の回数
int k = sc.nextInt();
//攻撃回数
int t = 0;
// 必殺技で除去できる物は除外
if(k>=h){
System.out.println(t);
}
... | Main.java:13: error: cannot find symbol
if(k>=h){
^
symbol: variable h
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u615880092|p02785|0 | u615880092|p02785|0 | codenet | Compile Error | 671 | |
v2_s240008021 | s240008021 | s240008021 | p02785 | p02785 | u615880092 | u615880092 | 1,580,557,242 | 2020-02-01T11:40:42 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 敵の数
int n = sc.nextInt();
// 必殺技の回数
int k = sc.nextInt();
//攻撃回数
float t = 0;
// 必殺技で除去できる物は除外
if(k>=n){
System.out.println(t);
}
... | Main.java:19: error: incompatible types: int[] cannot be converted to float[]
float a[] = new int[n];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u615880092|p02785|0 | u615880092|p02785|0 | codenet | Compile Error | 675 | |
v2_s495650102 | s495650102 | s495650102 | p02785 | p02785 | u626353997 | u626353997 | 1,585,485,099 | 2020-03-29T12:31:39 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
List<Integer> hp = new ArrayList<>();
long ans = 0;
for(int i = 0;i < n;i++){
hp.add(sc.nextInt());
}
Collections.s... | Main.java:14: error: cannot find symbol
for(int i = 0; i < n-k;i++){
^
symbol: variable k
location: class Main
Main.java:15: error: cannot find symbol
ans += list.get(i);
^
symbol: variable list
location: class Main
Main.java:17: error: can... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u626353997|p02785|0 | u626353997|p02785|0 | codenet | Compile Error | 466 | |
v2_s290912618 | s290912618 | s290912618 | p02785 | p02785 | u626353997 | u626353997 | 1,585,485,139 | 2020-03-29T12:32:19 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
List<Integer> hp = new ArrayList<>();
long ans = 0;
for(int i = 0;i < n;i++){
hp.add(sc.nextInt());
... | Main.java:16: error: cannot find symbol
ans += list.get(i);
^
symbol: variable list
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u626353997|p02785|0 | u626353997|p02785|0 | codenet | Compile Error | 496 | |
v2_s458913584 | s458913584 | s458913584 | p02785 | p02785 | u745236275 | u745236275 | 1,588,617,082 | 2020-05-04T18:31:22 | Main.java | import java.util.Arrays;
public class Main {
public static void main(String[] args) {
java.util.Scanner scan = new java.util.Scanner(System.in);
long N = scan.nextInt();
long K = scan.nextInt();
long[] H = new long[N];
long sum = 0;
if(K >= N ) {
System.out.println(N);
}
for (int i = 0;... | Main.java:11: error: incompatible types: possible lossy conversion from long to int
long[] H = new long[N];
^
Main.java:24: error: incompatible types: possible lossy conversion from long to int
for(int i =N-1; K>0 ; i--) {
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u745236275|p02785|0 | u745236275|p02785|0 | codenet | Compile Error | 525 | |
v2_s608830601 | s608830601 | s608830601 | p02785 | p02785 | u820895990 | u820895990 | 1,580,072,860 | 2020-01-26T21:07:40 | Main.java | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=sc.nextInt();
int[] a=new int[n];
for(int i=0;i<n;++i){
a[i]=sc.nextInt();
}
if(k>=n){
System.out.prinntln("0");
}
else{
Arr... | Main.java:12: error: cannot find symbol
System.out.prinntln("0");
^
symbol: method prinntln(String)
location: variable out of type PrintStream
Main.java:18: error: cannot find symbol
ans+=a[i];
^
symbol: variable ans
location: class Main
Main.java:20: error: cannot find s... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u820895990|p02785|0 | u820895990|p02785|0 | codenet | Compile Error | 456 | |
v2_s065417354 | s065417354 | s065417354 | p02785 | p02785 | u848025660 | u848025660 | 1,580,572,935 | 2020-02-01T16:02:15 | Main3.java | package Atcoder;
import java.util.Scanner;
public class Main3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();//攻撃
int K = sc.nextInt();//必殺技
int H[] = new int[n];//体力
int sum = 0;
for(int i =0; i <n; i++){
... | Main3.java:25: error: ';' expected
sum += H[i]}
^
Main3.java:31: error: ';' expected
sum += H[i]}
^
Main3.java:33: error: reached end of file while parsing
}
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u848025660|p02785|0 | u848025660|p02785|0 | codenet | Compile Error | 759 | |
v2_s157785836 | s157785836 | s157785836 | p02785 | p02785 | u875818555 | u875818555 | 1,580,767,218 | 2020-02-03T22:00:18 | Main.java | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
int sum = 0;
for(int i=0;i<n;i++)
arr[i] = sc.nextInt();
Arrays.sort(arr,Collections.rev... | Main.java:13: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(arr,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: int
upper... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 421 | |
v2_s880902487 | s880902487 | s880902487 | p02785 | p02785 | u875818555 | u875818555 | 1,580,767,298 | 2020-02-03T22:01:38 | Main.java | import java.util.Collections;
import java.io.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
int sum = 0;
for(int i=0;i<n;i++)
arr[i] = sc.nextInt();
Arrays.sort(arr,Colle... | 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
Main.java:13: error: cannot find ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 432 | |
v2_s396218664 | s396218664 | s396218664 | p02785 | p02785 | u875818555 | u875818555 | 1,580,767,378 | 2020-02-03T22:02:58 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
int sum = 0;
for(int i=0;i<n;i++)
arr[i] = sc.nextInt();
A... | Main.java:14: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(arr,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: int
upper... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 452 | |
v2_s138812996 | s138812996 | s138812996 | p02785 | p02785 | u875818555 | u875818555 | 1,580,767,458 | 2020-02-03T22:04:18 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
int sum = 0;
for(int i=0;i<n;i++)
arr... | Main.java:15: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(arr,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: int
upper... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 477 | |
v2_s843222185 | s843222185 | s843222185 | p02785 | p02785 | u875818555 | u875818555 | 1,580,768,116 | 2020-02-03T22:15:16 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long k = sc.nextLong();
long arr[] = new long[n];
long sum = 0;
for(long i=0;i<n;i++)
... | Main.java:11: error: incompatible types: possible lossy conversion from long to int
long arr[] = new long[n];
^
Main.java:14: error: incompatible types: possible lossy conversion from long to int
arr[i] = sc.nextLong();
^
Main.java:15: error: no suitable method found for so... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 487 | |
v2_s095106132 | s095106132 | s095106132 | p02785 | p02785 | u875818555 | u875818555 | 1,580,768,446 | 2020-02-03T22:20:46 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long k = sc.nextLong();
long arr[] = new long[int(n)];
long sum = 0;
for(long i=0;i<n;i... | Main.java:11: error: '.class' expected
long arr[] = new long[int(n)];
^
Main.java:11: error: not a statement
long arr[] = new long[int(n)];
^
Main.java:11: error: ';' expected
long arr[] = new long[int(n)];
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 492 | |
v2_s627469319 | s627469319 | s627469319 | p02785 | p02785 | u875818555 | u875818555 | 1,580,768,773 | 2020-02-03T22:26:13 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
long sum = 0;
for(int i=0;i<n;i++)
ar... | Main.java:15: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(arr,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: int
upper... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 475 | |
v2_s315355203 | s315355203 | s315355203 | p02785 | p02785 | u875818555 | u875818555 | 1,580,768,861 | 2020-02-03T22:27:41 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
BigInteger sum = 0;
for(int i=0;i<n;i++)
... | Main.java:12: error: cannot find symbol
BigInteger sum = 0;
^
symbol: class BigInteger
location: class Main
Main.java:15: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(arr,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 484 | |
v2_s360601065 | s360601065 | s360601065 | p02785 | p02785 | u875818555 | u875818555 | 1,580,768,958 | 2020-02-03T22:29:18 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
import java.util.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
BigInteger sum = 0;
... | Main.java:5: error: cannot find symbol
import java.util.Math;
^
symbol: class Math
location: package java.util
Main.java:13: error: cannot find symbol
BigInteger sum = 0;
^
symbol: class BigInteger
location: class Main
Main.java:16: error: no suitable method found for sort(int[],Comp... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 507 | |
v2_s876566007 | s876566007 | s876566007 | p02785 | p02785 | u875818555 | u875818555 | 1,580,769,061 | 2020-02-03T22:31:01 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
BigInteger sum = 0;
... | Main.java:13: error: cannot find symbol
BigInteger sum = 0;
^
symbol: class BigInteger
location: class Main
Main.java:16: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(arr,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|0 | u875818555|p02785|0 | codenet | Compile Error | 507 | |
v2_s522188678 | s522188678 | s522188678 | p02785 | p02785 | u875818555 | u875818555 | 1,580,833,432 | 2020-02-04T16:23:52 | Main.java | import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int arr[] = new int[n];
long sum = 0;
for(int i=0;i<n;i++)
ar... | Main.java:17: error: no suitable method found for sort(no arguments)
Arrays.sort();
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(cannot infer type-variable(s) T#1
(actual and formal argument lists differ in length))
method Arrays.<T#2>sort(T#2[],int,int... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02785|1 | u875818555|p02785|1 | codenet | Compile Error | 546 | |
v2_s675830414 | s675830414 | s675830414 | p02785 | p02785 | u901625272 | u901625272 | 1,580,070,580 | 2020-01-26T20:29:40 | Main.java | #include <iostream>
#include <algorithm>
#include <vector>
#include <regex>
#define pb push_back
using namespace std;
int main() {
int a, b;
int summ=0;
cin >> a >> b;
long long c[1000000];
for (int i = 0; i < a; i++)
{
cin >> c[i];
}
sort(c,c+10000000);
if (b > a) {
cout << 0;
}
else {
for (int i = 0... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <algorithm>
^
Main.java:3: error: illegal character: '#'
#include <vector>
^
Main.java:4: error: illegal character: '#'
#include <regex>
^
Main.java:5: error: illegal character: '#'
#define pb push_back
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u901625272|p02785|0 | u901625272|p02785|0 | codenet | Compile Error | 398 | |
v2_s297821530 | s297821530 | s297821530 | p02785 | p02785 | u941274418 | u941274418 | 1,580,651,492 | 2020-02-02T13:51:32 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
if(k >= n) {
System.out.println(0);
return;
}
int[] arr = new int[n];
... | Main.java:21: error: incompatible types: unexpected return value
return sum;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u941274418|p02785|1 | u941274418|p02785|1 | codenet | Compile Error | 552 | |
v2_s756485051 | s756485051 | s756485051 | p02785 | p02785 | u973653506 | u973653506 | 1,581,792,460 | 2020-02-15T18:47:40 | Main.java | import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int h[] = new int[n];
long sum = 0;
for(int i=0;i<n;i++) {
h[i]=sc.nextInt();
}
... | Main.java:19: error: no suitable method found for sort(int[],Comparator<Object>)
Arrays.sort(h,Collections.reverseOrder());
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
equality constraints: int
upper bou... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u973653506|p02785|0 | u973653506|p02785|0 | codenet | Compile Error | 553 | |
v2_s298245854 | s298245854 | s298245854 | p02785 | p02785 | u998192273 | u998192273 | 1,580,074,985 | 2020-01-26T21:43:05 | Main3.java | package Atcoder;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Arrays;
import java.util.Collections;
public class Main3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();//攻撃
int K = sc.nextInt();//必殺技
int H[] ... | Main3.java:25: error: cannot find symbol
H.remove(H.length);
^
symbol: method remove(int)
location: variable H of type int[]
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u998192273|p02785|0 | u998192273|p02785|0 | codenet | Compile Error | 799 | |
v2_s038646475 | s038646475 | s038646475 | p02786 | p02786 | u188396343 | u188396343 | 1,580,074,869 | 2020-01-26T21:41:09 | Main.java | #include <bits/stdc++.h>
using namespace std;
int main(){
long h;
cin >> h;
vector<long> H(0);
H.push_back(h);
long no = 0;
long total = 0;
long s;
while(true){
for(int i=0;i<H.size();i++){
cout << H[i];
}
cout << endl;
sort(H.begin(), H.end());
no = 0;
for(int i=0;i<H.siz... | Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:6: error: not a statement
cin >> h;
^
Main.java:14: error: not a statement
cout << H[i];
^
Main.java:16: error: not ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u188396343|p02786|0 | u188396343|p02786|0 | codenet | Compile Error | 713 | |
v2_s764856845 | s764856845 | s764856845 | p02786 | p02786 | u188396343 | u188396343 | 1,580,074,910 | 2020-01-26T21:41:50 | Main.java | #include <bits/stdc++.h>
using namespace std;
int main(){
long h;
cin >> h;
vector<long> H(0);
H.push_back(h);
long no = 0;
long total = 0;
long s;
while(true){
for(int i=0;i<H.size();i++){
cout << H[i];
}
cout << endl;
sort(H.begin(), H.end());
no = 0;
cout << endl;
f... | Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:6: error: not a statement
cin >> h;
^
Main.java:14: error: not a statement
cout << H[i];
^
Main.java:16: error: not ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u188396343|p02786|0 | u188396343|p02786|0 | codenet | Compile Error | 654 | |
v2_s974260864 | s974260864 | s974260864 | p02786 | p02786 | u218740431 | u218740431 | 1,580,598,327 | 2020-02-01T23:05:27 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Long a = sc.nextLong();
b = L(a);
System.out.println(b);
public static Long Ln(long x){if(x==1){return 1;
} else {if(x>=2){return 2*Ln(x/2);
... | Main.java:8: error: illegal start of expression
public static Long Ln(long x){if(x==1){return 1;
^
Main.java:16: error: class, interface, enum, or record expected
}
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02786|0 | u218740431|p02786|0 | codenet | Compile Error | 603 | |
v2_s985057847 | s985057847 | s985057847 | p02786 | p02786 | u218740431 | u218740431 | 1,580,598,436 | 2020-02-01T23:07:16 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Long a = sc.nextLong();
b = L(a);
System.out.println(b);
}
public static Long Ln(long x){
if(x==1){return 1;
} else {if(x>=2){retu... | Main.java:6: error: cannot find symbol
b = L(a);
^
symbol: variable b
location: class Main
Main.java:6: error: cannot find symbol
b = L(a);
^
symbol: method L(Long)
location: class Main
Main.java:7: error: cannot find symbol
System.out.println(b);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02786|0 | u218740431|p02786|0 | codenet | Compile Error | 614 | |
v2_s516510873 | s516510873 | s516510873 | p02786 | p02786 | u218740431 | u218740431 | 1,580,598,566 | 2020-02-01T23:09:26 | Main.java | import java.util.*;
public static Long Ln(long x){
if(x==1){return 1;
} else {if(x>=2){return 2*Ln(x/2);
}else{return 0; ... | Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static Long Ln(long x){
^
(use --enable-preview to enable unnamed classes)
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02786|0 | u218740431|p02786|0 | codenet | Compile Error | 722 | |
v2_s841395195 | s841395195 | s841395195 | p02786 | p02786 | u218740431 | u218740431 | 1,580,598,669 | 2020-02-01T23:11:09 | Main.java | import java.util.*;
public class Main {
public static Long Ln(long x){
if(x==1){return 1;
} else {if(x>=2){return 2*Ln(x/2);
}else{return 0; ... | Main.java:5: error: incompatible types: int cannot be converted to Long
if(x==1){return 1;
^
Main.java:7: error: incompatible types: int cannot be converted to Long
}else{return 0; ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02786|0 | u218740431|p02786|0 | codenet | Compile Error | 731 | |
v2_s152976398 | s152976398 | s152976398 | p02786 | p02786 | u218740431 | u218740431 | 1,580,598,823 | 2020-02-01T23:13:43 | Main.java | import java.util.*;
public class Main {
public static Long Ln(long x){
if(x<=1){return x;
} else {return 2*Ln(x/2);
} ... | Main.java:12: error: cannot find symbol
b = L(a);
^
symbol: variable b
location: class Main
Main.java:12: error: cannot find symbol
b = L(a);
^
symbol: method L(Long)
location: class Main
Main.java:13: error: cannot find symbol
System.out.println(b);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02786|0 | u218740431|p02786|0 | codenet | Compile Error | 572 | |
v2_s024233204 | s024233204 | s024233204 | p02786 | p02786 | u218740431 | u218740431 | 1,580,598,862 | 2020-02-01T23:14:22 | Main.java | import java.util.*;
public class Main {
public static Long Ln(long x){
if(x<=1){return x;
} else {return 2*Ln(x/2);
} ... | Main.java:12: error: cannot find symbol
b = Ln(a);
^
symbol: variable b
location: class Main
Main.java:13: error: cannot find symbol
System.out.println(b);
^
symbol: variable b
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u218740431|p02786|0 | u218740431|p02786|0 | codenet | Compile Error | 573 | |
v2_s921194040 | s921194040 | s921194040 | p02786 | p02786 | u225897163 | u225897163 | 1,580,074,449 | 2020-01-26T21:34:09 | CaracalMonster.java | import java.io.*;
import java.lang.math;
public class CaracalMonster
{
public static void main(String [] args)
{
Scanner sc= new Scanner(System.in);
System.out.print("Enter health of monster");
int x= sc.nextInt();
long count= 1;
if(x== 1)
System.out.println(1);
... | CaracalMonster.java:2: error: cannot find symbol
import java.lang.math;
^
symbol: class math
location: package java.lang
CaracalMonster.java:7: error: cannot find symbol
Scanner sc= new Scanner(System.in);
^
symbol: class Scanner
location: class CaracalMonster
CaracalMonster.java:7: ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u225897163|p02786|0 | u225897163|p02786|0 | codenet | Compile Error | 567 | |
v2_s096949993 | s096949993 | s096949993 | p02786 | p02786 | u276152693 | u276152693 | 1,597,728,817 | 2020-08-18T05:33:37 | Main.java | H = int(input())
res, cnt = 0, 1
while H > 1:
H = H // 2
res += cnt
cnt *= 2
print(res + cnt)
| Main.java:1: error: class, interface, enum, or record expected
H = int(input())
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u276152693|p02786|0 | u276152693|p02786|0 | codenet | Compile Error | 106 | |
v2_s681238359 | s681238359 | s681238359 | p02786 | p02786 | u424410618 | u424410618 | 1,580,074,055 | 2020-01-26T21:27:35 | Main.java | import java.util.Scanner;
import java.util.*;
public class Main {
public static void main(String[] args) {
try (Scanner scn = new Scanner(System.in)) {
long h = scn.nextLong();
long tekicount = 1;
while(true){
if(h == 1){
tekicount = tekico... | Main.java:18: error: cannot find symbol
total = tekicount - 1 ;
^
symbol: variable total
location: class Main
Main.java:20: error: cannot find symbol
System.out.println(total);
^
symbol: variable total
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u424410618|p02786|0 | u424410618|p02786|0 | codenet | Compile Error | 547 | |
v2_s836928544 | s836928544 | s836928544 | p02786 | p02786 | u456177179 | u456177179 | 1,580,074,496 | 2020-01-26T21:34:56 | Main.java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
int result = 0;
int p = 0;
int count = 0;
Scanner scanner = new Scanner(System.in);
int H = scanner.nextInt();
while(H=1){
H = H/2;
count += 1;
}
for(int i =0; i<count; i++){
result = result + Math.pow(2, count);
}
... | Main.java:14: error: incompatible types: int cannot be converted to boolean
while(H=1){
^
Main.java:20: error: incompatible types: possible lossy conversion from double to int
result = result + Math.pow(2, count);
^
Main.java:23: error: cannot find symbol
System.out.println(reslut);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u456177179|p02786|0 | u456177179|p02786|0 | codenet | Compile Error | 364 | |
v2_s409527809 | s409527809 | s409527809 | p02786 | p02786 | u456177179 | u456177179 | 1,580,074,624 | 2020-01-26T21:37:04 | Main.java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
double result = 0;
int p = 0;
int count = 0;
Scanner scanner = new Scanner(System.in);
int H = scanner.nextInt();
while(H=1){
H = H/2;
count += 1;
}
for(int i =0; i<count; i++){
result = result + Math.pow(2, count);... | Main.java:23: error: '.class' expected
System.out.println(int(result));
^
Main.java:23: error: not a statement
System.out.println(int(result));
^
Main.java:23: error: ';' expected
System.out.println(int(result));
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u456177179|p02786|0 | u456177179|p02786|0 | codenet | Compile Error | 372 | |
v2_s376067434 | s376067434 | s376067434 | p02786 | p02786 | u615880092 | u615880092 | 1,580,559,071 | 2020-02-01T12:11:11 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 敵の体力
int h = sc.nextInt();
for(int i;h>Math.pow(2,i);i++){
if(h<Math.pow(2,i+1){
System.out.println(Math.pow(2,i+1)-1);
}
}
}
| Main.java:9: error: ')' expected
if(h<Math.pow(2,i+1){
^
Main.java:13: error: reached end of file while parsing
}
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u615880092|p02786|0 | u615880092|p02786|0 | codenet | Compile Error | 302 | |
v2_s895732634 | s895732634 | s895732634 | p02786 | p02786 | u615880092 | u615880092 | 1,580,559,133 | 2020-02-01T12:12:13 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 敵の体力
int h = sc.nextInt();
for(int i;h>Math.pow(2,i);i++){
if(h<Math.pow(2,i+1){
System.out.println(Math.pow(2,i+1)-1);
}
}
}
}
| Main.java:9: error: ')' expected
if(h<Math.pow(2,i+1){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u615880092|p02786|0 | u615880092|p02786|0 | codenet | Compile Error | 312 | |
v2_s142177209 | s142177209 | s142177209 | p02786 | p02786 | u615880092 | u615880092 | 1,580,559,171 | 2020-02-01T12:12:51 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 敵の体力
int h = sc.nextInt();
for(int i;h>Math.pow(2,i);i++){
if(h<Math.pow(2,i+1)){
System.out.println(Math.pow(2,i+1)-1);
}
}
}
}
| Main.java:8: error: variable i might not have been initialized
for(int i;h>Math.pow(2,i);i++){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u615880092|p02786|0 | u615880092|p02786|0 | codenet | Compile Error | 313 | |
v2_s808719869 | s808719869 | s808719869 | p02786 | p02786 | u659156129 | u659156129 | 1,598,862,088 | 2020-08-31T08:21:28 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int ans;
int count;
ans=count=0;
while(n != 0){
n/=2;
ans += Math.pow(2, count);
count++;
}
... | Main.java:15: error: cannot find symbol
Systemout.println(ans);
^
symbol: variable Systemout
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u659156129|p02786|0 | u659156129|p02786|0 | codenet | Compile Error | 352 | |
v2_s640786938 | s640786938 | s640786938 | p02786 | p02786 | u820895990 | u820895990 | 1,580,073,856 | 2020-01-26T21:24:16 | Main.java | import java.util.*;
public class Main{
static long findAns(long n,long ans,int count){
if(n>1){
ans+=Math.pow(2,count);
++count;
findAns(n/2,ans);
}
else if(n==1){
ans+=Math.pow(2,count);
return ans;
}
}
public static void main(String args[]){
Scanner sc=new... | Main.java:8: error: method findAns in class Main cannot be applied to given types;
findAns(n/2,ans);
^
required: long,long,int
found: long,long
reason: actual and formal argument lists differ in length
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u820895990|p02786|0 | u820895990|p02786|0 | codenet | Compile Error | 431 | |
v2_s362468548 | s362468548 | s362468548 | p02786 | p02786 | u820895990 | u820895990 | 1,580,073,896 | 2020-01-26T21:24:56 | Main.java | import java.util.*;
public class Main{
static long findAns(long n,long ans,int count){
if(n>1){
ans+=Math.pow(2,count);
++count;
findAns(n/2,ans,count);
}
else if(n==1){
ans+=Math.pow(2,count);
return ans;
}
}
public static void main(String args[]){
Scanner ... | Main.java:14: error: missing return statement
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u820895990|p02786|0 | u820895990|p02786|0 | codenet | Compile Error | 437 | |
v2_s623546888 | s623546888 | s623546888 | p02786 | p02786 | u820895990 | u820895990 | 1,580,073,976 | 2020-01-26T21:26:16 | Main.java | import java.util.*;
public class Main{
static long findAns(long n,long ans,int count){
if(n>1){
ans+=Math.pow(2,count);
++count;
findAns(n/2,ans,count);
}
else{
ans+=Math.pow(2,count);
return ans;
}
}
public static void main(String args[]){
Scanner sc=new Sc... | Main.java:14: error: missing return statement
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u820895990|p02786|0 | u820895990|p02786|0 | codenet | Compile Error | 428 | |
v2_s534876319 | s534876319 | s534876319 | p02786 | p02786 | u875818555 | u875818555 | 1,580,916,527 | 2020-02-05T15:28:47 | Main.java | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int attacks;
if(h==1)
System.out.println(0);
else{
attacks = Math.log(h)/Math.log(2);
attacks*=2;
attacks+=h-1;
}
Sy... | Main.java:12: error: incompatible types: possible lossy conversion from double to int
attacks = Math.log(h)/Math.log(2);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 366 | |
v2_s725629522 | s725629522 | s725629522 | p02786 | p02786 | u875818555 | u875818555 | 1,580,916,604 | 2020-02-05T15:30:04 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int attacks;
if(h==1)
System.out.println(0);
else{
attacks = (int)(Math.log(h)/Math.log(2));
attacks*=2;
... | Main.java:17: error: variable attacks might not have been initialized
System.out.println(attacks);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 397 | |
v2_s570999733 | s570999733 | s570999733 | p02786 | p02786 | u875818555 | u875818555 | 1,580,917,944 | 2020-02-05T15:52:24 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
double attacks=0;;
while(h>0)
attacks=h*2;
}
System.out.println(attacks-1);
}
}
| Main.java:14: error: <identifier> expected
System.out.println(attacks-1);
^
Main.java:14: error: <identifier> expected
System.out.println(attacks-1);
^
Main.java:16: error: class, interface, enum, or record expected
}
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 314 | |
v2_s287880990 | s287880990 | s287880990 | p02786 | p02786 | u875818555 | u875818555 | 1,580,917,995 | 2020-02-05T15:53:15 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
double attacks=0;;
while(h>0)
attacks=h*2;
}
attacks-=1;
System.out.println(attacks);
}
}
... | Main.java:14: error: <identifier> expected
attacks-=1;
^
Main.java:15: error: <identifier> expected
System.out.println(attacks);
^
Main.java:15: error: <identifier> expected
System.out.println(attacks);
^
Main.java:17: error: class, interface, enum,... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 326 | |
v2_s538747841 | s538747841 | s538747841 | p02786 | p02786 | u875818555 | u875818555 | 1,580,918,604 | 2020-02-05T16:03:24 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
void cal(double h){
double attacks = 0;
attacks = 2*cal(h/2) + 1;
System.out.println(attacks);
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
cal(h);
}
}
... | Main.java:8: error: 'void' type not allowed here
attacks = 2*cal(h/2) + 1;
^
Main.java:14: error: non-static method cal(double) cannot be referenced from a static context
cal(h);
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 334 | |
v2_s785469732 | s785469732 | s785469732 | p02786 | p02786 | u875818555 | u875818555 | 1,580,918,659 | 2020-02-05T16:04:19 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
static void cal(double h){
double attacks = 0;
attacks = 2*cal(h/2) + 1;
System.out.println(attacks);
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
cal(h);... | Main.java:8: error: 'void' type not allowed here
attacks = 2*cal(h/2) + 1;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 341 | |
v2_s973436183 | s973436183 | s973436183 | p02786 | p02786 | u875818555 | u875818555 | 1,580,918,966 | 2020-02-05T16:09:26 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
double attacks = 0;
while(h){
attacks = 2*h + 1;
h = h/2;}
System.out.println(attacks);
}
}
| Main.java:10: error: incompatible types: double cannot be converted to boolean
while(h){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 319 | |
v2_s549510585 | s549510585 | s549510585 | p02786 | p02786 | u875818555 | u875818555 | 1,580,919,181 | 2020-02-05T16:13:01 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
double attacks = 0;
while(h>0){
attacks+ = 2*(h/2) + 1;
h = h/2;
}
attacks = attacks-1;
System.out.pr... | Main.java:11: error: illegal start of expression
attacks+ = 2*(h/2) + 1;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 356 | |
v2_s338242986 | s338242986 | s338242986 | p02786 | p02786 | u875818555 | u875818555 | 1,580,919,287 | 2020-02-05T16:14:47 | Main.java | import java.util.*;
import java.io.*;
import java.lang.Math;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double h = sc.nextDouble();
double attacks = 0;
double temp =0;
while(h>0){
temp = 2*(h/2)+1;
attacks+ = temp;
}
attacks =... | Main.java:13: error: illegal start of expression
attacks+ = temp;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|0 | u875818555|p02786|0 | codenet | Compile Error | 385 | |
v2_s326580086 | s326580086 | s326580086 | p02786 | p02786 | u875818555 | u875818555 | 1,581,013,524 | 2020-02-06T18:25:24 | Solution.java | import java.util.*;
public class Solution
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = Math.floor(Math.log(2*n)/Math.log(2));
t = Math.pow(2,t);
System.out.println(t-1);
}
}
| Solution.java:8: error: incompatible types: possible lossy conversion from double to int
int t = Math.floor(Math.log(2*n)/Math.log(2));
^
Solution.java:9: error: incompatible types: possible lossy conversion from double to int
t = Math.pow(2,t);
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|2 | u875818555|p02786|1 | codenet | Compile Error | 269 | |
v2_s601011759 | s601011759 | s601011759 | p02786 | p02786 | u875818555 | u875818555 | 1,581,013,595 | 2020-02-06T18:26:35 | Solution.java | import java.util.*;
public class Solution
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = (int)Math.floor(Math.log(2*n)/Math.log(2));
t = Math.pow(2,t);
System.out.println(t-1);
}
}
| Solution.java:9: error: incompatible types: possible lossy conversion from double to int
t = Math.pow(2,t);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p02786|2 | u875818555|p02786|1 | codenet | Compile Error | 275 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.