結果
問題 | No.63 ポッキーゲーム |
ユーザー |
|
提出日時 | 2017-03-26 16:16:06 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 468 ms / 5,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 2,175 ms |
コンパイル使用メモリ | 74,896 KB |
実行使用メモリ | 41,556 KB |
最終ジャッジ日時 | 2024-12-24 05:25:40 |
合計ジャッジ時間 | 6,389 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import java.util.Scanner; class pokkii{ public static void main(String args[]){ Scanner s = new Scanner(System.in); int L = s.nextInt(); int K = s.nextInt(); int i = 0; int sum = 0; while(K * 2 * i < L){ i++; sum += K * 2; } if(sum >= L){ System.out.println(K * (i - 1)); }else{ System.out.println(K * i); } } }