結果

問題 No.604 誕生日のお小遣い
ユーザー takeya_okinotakeya_okino
提出日時 2019-08-04 15:59:09
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 2,926 ms
コンパイル使用メモリ 71,132 KB
実行使用メモリ 58,264 KB
最終ジャッジ日時 2023-09-22 18:03:03
合計ジャッジ時間 7,039 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 119 ms
55,656 KB
testcase_02 AC 122 ms
55,628 KB
testcase_03 AC 121 ms
55,844 KB
testcase_04 AC 122 ms
55,320 KB
testcase_05 AC 121 ms
55,460 KB
testcase_06 AC 124 ms
55,780 KB
testcase_07 AC 122 ms
55,508 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 122 ms
55,908 KB
testcase_11 AC 122 ms
55,904 KB
testcase_12 AC 127 ms
56,040 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 121 ms
55,748 KB
testcase_16 WA -
testcase_17 AC 125 ms
55,980 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long ans = (c / (a - 1 + b)) * a;
    ans += (c - (c / (a - 1 + b)) * (a - 1 + b));
    System.out.println(ans);
  }
}
0