結果
問題 |
No.308 素数は通れません
|
ユーザー |
![]() |
提出日時 | 2015-12-02 22:16:41 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,022 bytes |
コンパイル時間 | 2,324 ms |
コンパイル使用メモリ | 78,496 KB |
実行使用メモリ | 54,352 KB |
最終ジャッジ日時 | 2024-09-14 08:04:30 |
合計ジャッジ時間 | 18,289 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 92 WA * 15 |
ソースコード
import java.math.BigInteger; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger N = new BigInteger(sc.next()); final BigInteger four = BigInteger.valueOf(4); final BigInteger six = BigInteger.valueOf(6); final BigInteger eight = BigInteger.valueOf(8); final BigInteger nine = BigInteger.valueOf(9); final BigInteger ten = BigInteger.valueOf(10); final BigInteger fifteen = BigInteger.valueOf(15); final BigInteger sixteen = BigInteger.valueOf(16); final BigInteger twentytwo = BigInteger.valueOf(22); if(N.equals(four)){ System.out.println(3); }else if(N.equals(six)){ System.out.println(5); }else if(N.equals(eight) || N.equals(nine) || N.equals(ten) || N.equals(fifteen) || N.equals(sixteen) || N.equals(twentytwo)){ System.out.println(7); }else{ System.out.println(8); } } }