結果

問題 No.2194 兄弟の掛け引き
ユーザー roarisroaris
提出日時 2023-01-25 07:41:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 209 bytes
コンパイル時間 457 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 75,732 KB
最終ジャッジ日時 2023-09-08 20:01:07
合計ジャッジ時間 3,375 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,436 KB
testcase_01 AC 75 ms
75,496 KB
testcase_02 AC 73 ms
75,504 KB
testcase_03 AC 73 ms
75,732 KB
testcase_04 AC 73 ms
75,596 KB
testcase_05 AC 73 ms
75,452 KB
testcase_06 AC 72 ms
75,504 KB
testcase_07 AC 74 ms
75,596 KB
testcase_08 AC 73 ms
75,404 KB
testcase_09 AC 73 ms
75,432 KB
testcase_10 AC 73 ms
75,488 KB
testcase_11 AC 74 ms
75,680 KB
testcase_12 AC 73 ms
75,692 KB
testcase_13 AC 73 ms
75,652 KB
testcase_14 AC 74 ms
75,544 KB
testcase_15 AC 73 ms
75,624 KB
testcase_16 AC 72 ms
75,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for N in range(2*10**5+10):
    if N*A-B==C or (N*A-B<=0 and N*A==C):
        ans.append(N)

if len(ans)==0:
    print(-1)
else:
    for N in ans:
        print(N)
0