結果

問題 No.63 ポッキーゲーム
ユーザー spring
提出日時 2019-06-12 15:49:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 363 bytes
コンパイル時間 2,019 ms
コンパイル使用メモリ 74,392 KB
実行使用メモリ 54,372 KB
最終ジャッジ日時 2024-10-10 21:29:10
合計ジャッジ時間 5,819 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int pocky = sc.nextInt();
		int longP = sc.nextInt();
		sc.close();
		if(pocky%(longP*2)==0){
			System.out.println(((pocky/(longP*2))-1)*longP);
		}else{
			System.out.println((pocky/(longP*2))*longP);
		}
	}// mainmethod

} // clas
0