Skip to content

Commit f4b9c2e

Browse files
author
DAyamaCTF
authored
Merge pull request #59 from tossy310/tossy/even2primes
Fix Even2Primes java-tossy
2 parents 5bdb0d0 + 3e6ff4a commit f4b9c2e

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

even2primes/PROBLEM

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pid='X'
44

55
problem(
6-
time_limit=5.0,
6+
time_limit=10.0,
77
id=pid,
88
title=pid + "Even2Primes",
99
#wiki_name="Your pukiwiki page name", # for wikify plugin

enen2primes/java-tossy/Even2Primes.java renamed to even2primes/java-tossy/Even2Primes.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import java.io.PrintWriter;
12
import java.util.Arrays;
23
import java.util.Scanner;
34

45
public class Even2Primes {
56
private static final Scanner sc = new Scanner(System.in);
7+
private static final PrintWriter pw = new PrintWriter(System.out);
68
private static final int MAX_N = 5000000;
79
private static boolean isPrime[] = new boolean[MAX_N + 1];
810

@@ -33,7 +35,9 @@ public static void main(final String[] args) {
3335
answer++;
3436
}
3537
}
36-
System.out.println(answer);
38+
pw.println(answer);
3739
}
40+
sc.close();
41+
pw.close();
3842
}
3943
}
File renamed without changes.

0 commit comments

Comments
 (0)