結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2016-01-14 22:22:35 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 459 ms / 5,000 ms |
コード長 | 799 bytes |
コンパイル時間 | 3,535 ms |
コンパイル使用メモリ | 75,552 KB |
実行使用メモリ | 37,860 KB |
最終ジャッジ日時 | 2024-12-24 04:59:06 |
合計ジャッジ時間 | 6,707 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class PockyGame {public static void main(String[] args) throws IOException {// TODO 自動生成されたメソッド・スタブ//長さint length;//齧るスピードint speed;//入力値String[] input;//入力待ちBufferedReader in = new BufferedReader(new InputStreamReader(System.in));input = in.readLine().split(" ");length = Integer.parseInt(input[0]);speed = Integer.parseInt(input[1]);int counter = 0;while(true){//ハルカちゃんlength = length - speed;//ユウちゃんif(length - speed > 0){length = length - speed;counter++;}else{break;}}System.out.println(speed * counter);}}