結果

問題 No.63 ポッキーゲーム
ユーザー kou6839
提出日時 2014-11-19 13:47:24
言語 Java
(openjdk 23)
結果
AC  
実行時間 396 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 2,290 ms
コンパイル使用メモリ 74,932 KB
実行使用メモリ 41,412 KB
最終ジャッジ日時 2024-12-24 04:43:39
合計ジャッジ時間 7,123 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		int ans=0;
		while(x>y*2){
			x-=y*2;
			ans++;
		}
		System.out.println(ans*y);
	}
}		
0