結果
問題 | No.312 置換処理 |
ユーザー | gu_21816943 |
提出日時 | 2017-06-28 00:26:37 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 612 bytes |
コンパイル時間 | 2,085 ms |
コンパイル使用メモリ | 74,588 KB |
実行使用メモリ | 52,456 KB |
最終ジャッジ日時 | 2024-04-15 03:39:18 |
合計ジャッジ時間 | 5,400 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 49 ms
50,316 KB |
testcase_02 | AC | 66 ms
51,168 KB |
testcase_03 | AC | 50 ms
50,356 KB |
testcase_04 | AC | 50 ms
50,144 KB |
testcase_05 | AC | 49 ms
50,084 KB |
testcase_06 | WA | - |
testcase_07 | AC | 52 ms
50,356 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 52 ms
50,120 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 51 ms
50,416 KB |
testcase_23 | WA | - |
testcase_24 | AC | 51 ms
50,344 KB |
testcase_25 | AC | 49 ms
50,256 KB |
testcase_26 | AC | 51 ms
50,360 KB |
testcase_27 | AC | 53 ms
50,380 KB |
testcase_28 | AC | 50 ms
50,496 KB |
testcase_29 | AC | 51 ms
50,408 KB |
testcase_30 | AC | 50 ms
50,376 KB |
testcase_31 | WA | - |
testcase_32 | AC | 52 ms
50,496 KB |
testcase_33 | AC | 54 ms
50,408 KB |
testcase_34 | AC | 55 ms
50,480 KB |
testcase_35 | AC | 50 ms
50,436 KB |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | AC | 51 ms
49,908 KB |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | AC | 51 ms
50,336 KB |
testcase_43 | AC | 49 ms
50,324 KB |
testcase_44 | WA | - |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; class Main { static PrintWriter out = new PrintWriter(System.out); static String str; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); long len = Long.parseLong(br.readLine()); int i; double sqr=Math.sqrt(len); if(len%2==0){ System.out.println(len/2); return; } for(i=3;i<=sqr;i+=2){ if(len%i==0){ System.out.println(i); return; } } System.out.println(len); } }