結果

問題 No.63 ポッキーゲーム
ユーザー ダンネックダンネック
提出日時 2020-05-24 01:20:20
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 3,963 ms
コンパイル使用メモリ 75,148 KB
実行使用メモリ 41,524 KB
最終ジャッジ日時 2024-04-17 20:44:44
合計ジャッジ時間 7,305 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,268 KB
testcase_01 AC 119 ms
40,368 KB
testcase_02 AC 105 ms
41,508 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 120 ms
39,936 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 135 ms
41,172 KB
testcase_09 WA -
testcase_10 AC 134 ms
41,524 KB
testcase_11 AC 132 ms
41,280 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class length{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
        int wari = a / (b * 2);
        int dasi = wari * b;
        int ate = a / 2;
        if(ate == dasi){
            System.out.println(dasi);
        }else{
            System.out.println("0");
        }
	    sc.close();
    }
}
0