結果
| 問題 | No.63 ポッキーゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-05 16:35:27 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 258 ms / 5,000 ms |
| + 726µs | |
| コード長 | 697 bytes |
| 記録 | |
| コンパイル時間 | 2,587 ms |
| コンパイル使用メモリ | 82,704 KB |
| 実行使用メモリ | 44,200 KB |
| 最終ジャッジ日時 | 2026-09-01 22:50:54 |
| 合計ジャッジ時間 | 5,426 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
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;
}
}