結果

問題 No.2194 兄弟の掛け引き
ユーザー strangerxxxstrangerxxx
提出日時 2023-01-20 21:30:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 1,000 ms
コード長 336 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 75,380 KB
最終ジャッジ日時 2023-09-05 13:40:36
合計ジャッジ時間 2,477 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,280 KB
testcase_01 AC 76 ms
71,324 KB
testcase_02 AC 71 ms
71,332 KB
testcase_03 AC 70 ms
71,308 KB
testcase_04 AC 71 ms
71,328 KB
testcase_05 AC 70 ms
71,260 KB
testcase_06 AC 70 ms
71,192 KB
testcase_07 AC 71 ms
71,404 KB
testcase_08 AC 76 ms
71,320 KB
testcase_09 AC 73 ms
75,320 KB
testcase_10 AC 74 ms
75,236 KB
testcase_11 AC 75 ms
75,308 KB
testcase_12 AC 74 ms
75,364 KB
testcase_13 AC 76 ms
75,236 KB
testcase_14 AC 76 ms
75,380 KB
testcase_15 AC 74 ms
75,240 KB
testcase_16 AC 75 ms
75,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def resolve():
    a, b, c = map(int, input().split())
    ans = set()
    for i in range(1, c + b + 1):
        j = i * a
        if j > b:
            j -= b
        if j == c:
            ans.add(i)
    if ans:
        for i in sorted(ans):
            print(i)
    else:
        print(-1)


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