結果

問題 No.2194 兄弟の掛け引き
ユーザー miya145592miya145592
提出日時 2023-04-30 05:38:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 57,600 KB
最終ジャッジ日時 2024-04-29 17:08:11
合計ジャッジ時間 1,824 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

flag = False
for n in range(1, 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