結果

問題 No.63 ポッキーゲーム
ユーザー popopopepepe1popopopepepe1
提出日時 2019-09-29 08:30:51
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 2,466 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 54,632 KB
最終ジャッジ日時 2024-04-14 07:11:15
合計ジャッジ時間 6,498 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
54,224 KB
testcase_01 AC 139 ms
54,036 KB
testcase_02 WA -
testcase_03 AC 132 ms
53,948 KB
testcase_04 AC 135 ms
54,228 KB
testcase_05 AC 140 ms
54,268 KB
testcase_06 AC 135 ms
54,288 KB
testcase_07 AC 133 ms
53,960 KB
testcase_08 AC 134 ms
54,272 KB
testcase_09 AC 135 ms
54,380 KB
testcase_10 AC 133 ms
54,096 KB
testcase_11 AC 136 ms
53,780 KB
testcase_12 AC 134 ms
53,980 KB
testcase_13 WA -
testcase_14 AC 134 ms
53,796 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 140 ms
54,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int x = sc.nextInt();
    
    if(N/x/2==1 && N%x==0){
        System.out.println(0);
    }else{
        int y=(N/x/2)*x;
        System.out.println(y);
    }

  }
}
0