結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
![]() |
提出日時 | 2017-11-30 01:49:39 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 3,665 ms |
コンパイル使用メモリ | 74,316 KB |
実行使用メモリ | 56,148 KB |
最終ジャッジ日時 | 2024-11-27 19:21:31 |
合計ジャッジ時間 | 9,093 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 5 |
ソースコード
import java.util.Scanner; public class No63 { public static void main(String[]args) { Scanner sc = new Scanner(System.in); int length=sc.nextInt(); int K = sc.nextInt(); int cnt=0; do { length = length-2*K; if(length==0) break; cnt += K; }while(length>K); System.out.println(cnt); } }