結果
問題 | No.63 ポッキーゲーム |
ユーザー | heyanxx |
提出日時 | 2019-07-05 16:35:27 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 295 ms / 5,000 ms |
コード長 | 697 bytes |
コンパイル時間 | 3,459 ms |
コンパイル使用メモリ | 74,164 KB |
実行使用メモリ | 53,924 KB |
最終ジャッジ日時 | 2023-10-21 20:14:51 |
合計ジャッジ時間 | 6,379 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 51 ms
53,444 KB |
testcase_01 | AC | 51 ms
53,432 KB |
testcase_02 | AC | 49 ms
53,440 KB |
testcase_03 | AC | 50 ms
53,440 KB |
testcase_04 | AC | 51 ms
53,444 KB |
testcase_05 | AC | 51 ms
53,444 KB |
testcase_06 | AC | 52 ms
53,444 KB |
testcase_07 | AC | 55 ms
53,440 KB |
testcase_08 | AC | 54 ms
53,440 KB |
testcase_09 | AC | 62 ms
53,448 KB |
testcase_10 | AC | 66 ms
53,900 KB |
testcase_11 | AC | 295 ms
53,924 KB |
testcase_12 | AC | 67 ms
53,460 KB |
testcase_13 | AC | 289 ms
53,892 KB |
testcase_14 | AC | 67 ms
53,888 KB |
testcase_15 | AC | 72 ms
53,912 KB |
testcase_16 | AC | 64 ms
53,452 KB |
testcase_17 | AC | 278 ms
53,488 KB |
testcase_18 | AC | 61 ms
53,904 KB |
testcase_19 | AC | 98 ms
53,892 KB |
testcase_20 | AC | 65 ms
53,476 KB |
testcase_21 | AC | 75 ms
53,904 KB |
ソースコード
package test.demo; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Yukicoder63 { public static void main(String[] args) throws IOException { // TODO 自動生成されたメソッド・スタブ String[]str=input(); int L=Integer.parseInt(str[0]); int K=Integer.parseInt(str[1]); int count=0; while(true) { L=L-2*K; if(L<=0) { System.out.println(count); return; } count+=K; } } public static String[] input() throws IOException { BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); String str=br.readLine(); String[]str2=str.split(" "); return str2; } }