結果

問題 No.2194 兄弟の掛け引き
ユーザー miya145592miya145592
提出日時 2023-04-30 05:40:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 1,000 ms
コード長 278 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 57,728 KB
最終ジャッジ日時 2024-04-29 17:09:00
合計ジャッジ時間 1,763 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
57,216 KB
testcase_01 AC 47 ms
57,472 KB
testcase_02 AC 47 ms
57,600 KB
testcase_03 AC 48 ms
57,600 KB
testcase_04 AC 47 ms
57,728 KB
testcase_05 AC 46 ms
57,088 KB
testcase_06 AC 49 ms
57,216 KB
testcase_07 AC 50 ms
57,344 KB
testcase_08 AC 46 ms
57,216 KB
testcase_09 AC 47 ms
57,088 KB
testcase_10 AC 48 ms
57,344 KB
testcase_11 AC 47 ms
57,344 KB
testcase_12 AC 46 ms
57,344 KB
testcase_13 AC 47 ms
57,600 KB
testcase_14 AC 48 ms
57,728 KB
testcase_15 AC 46 ms
57,088 KB
testcase_16 AC 47 ms
57,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C = map(int, input().split())

flag = False
for n in range(1, 2*10**5+1):
    ans = n*A
    if ans>B:
        if ans-B==C:
            print(n)
            flag = True
    else:
        if ans==C:
            print(n)
            flag = True

if flag==False:
    print(-1)
0