結果

問題 No.1517 Party Location
ユーザー 遭難者遭難者
提出日時 2021-05-05 01:25:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 276 bytes
コンパイル時間 1,928 ms
コンパイル使用メモリ 72,464 KB
実行使用メモリ 56,008 KB
最終ジャッジ日時 2023-09-02 04:04:19
合計ジャッジ時間 4,721 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,712 KB
testcase_01 AC 123 ms
55,524 KB
testcase_02 AC 122 ms
56,000 KB
testcase_03 AC 122 ms
55,708 KB
testcase_04 AC 122 ms
55,880 KB
testcase_05 AC 122 ms
55,216 KB
testcase_06 AC 121 ms
55,756 KB
testcase_07 AC 120 ms
55,516 KB
testcase_08 AC 121 ms
55,716 KB
testcase_09 AC 121 ms
55,760 KB
testcase_10 AC 122 ms
56,008 KB
testcase_11 AC 122 ms
55,628 KB
testcase_12 AC 122 ms
55,816 KB
testcase_13 AC 121 ms
55,684 KB
testcase_14 AC 125 ms
55,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

class Main {
  public static void main(String[] args){
    var sc = new java.util.Scanner(System.in);
    int d = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    int x = a < b ? d : 0;
    int ans = x * a + (d - x) * b;
    System.out.println(ans);
  }
}
0