結果
| 問題 |
No.63 ポッキーゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-05 16:35:27 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 311 ms / 5,000 ms |
| コード長 | 697 bytes |
| コンパイル時間 | 3,589 ms |
| コンパイル使用メモリ | 73,640 KB |
| 実行使用メモリ | 37,608 KB |
| 最終ジャッジ日時 | 2024-09-21 21:40:07 |
| 合計ジャッジ時間 | 6,620 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
}