結果

問題 No.604 誕生日のお小遣い
ユーザー tails1434tails1434
提出日時 2020-02-14 07:42:27
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 146,780 KB
最終ジャッジ日時 2023-07-28 15:45:02
合計ジャッジ時間 4,942 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 65 ms
71,652 KB
testcase_02 AC 68 ms
71,200 KB
testcase_03 AC 67 ms
71,552 KB
testcase_04 AC 69 ms
71,408 KB
testcase_05 AC 67 ms
71,124 KB
testcase_06 AC 68 ms
71,256 KB
testcase_07 AC 68 ms
71,456 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 67 ms
71,568 KB
testcase_11 AC 69 ms
75,068 KB
testcase_12 AC 70 ms
75,324 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    A, B, C = map(int, input().split())
    money = 0
    age = 0
    while money < C:
        age += A
        money += B + (A - 1) * 1
    
    if money == C:
        print(age)
    else:
        money -= B
        age -= 1
        age -= money - C
        print(age)


if __name__ == "__main__":
    main()
0