結果

問題 No.63 ポッキーゲーム
ユーザー kazapyon27
提出日時 2017-05-07 22:44:50
言語 Java
(openjdk 23)
結果
AC  
実行時間 480 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 3,039 ms
コンパイル使用メモリ 74,252 KB
実行使用メモリ 41,512 KB
最終ジャッジ日時 2024-12-24 05:29:22
合計ジャッジ時間 7,683 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.5 No.63 ポッキーゲーム*/
import java.util.*;
public class NO63 {
	public static void main(String[] args) {
		int p_len,eat_len,Yuchan=0;
		try(Scanner input = new Scanner(System.in)){
			p_len=input.nextInt();
			eat_len=input.nextInt();
			while(p_len>0){
				p_len-=eat_len*2;
				Yuchan++;
			}
			System.out.println((Yuchan-1)*eat_len);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0