結果

問題 No.2194 兄弟の掛け引き
ユーザー MottchanMottchan
提出日時 2023-03-24 20:41:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 292 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,460 KB
実行使用メモリ 59,356 KB
最終ジャッジ日時 2023-10-18 20:35:32
合計ジャッジ時間 1,661 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

a,b,c = map(int, input().split())

ans=[]

for i in range(1,10**6):
    if i * a - b > 0:
        if i * a - b == c:
            ans.append(i)

    else:
        if i * a == c:
            ans.append(i)
            i += 1

if ans ==[]:
    print('-1')
else:
    for i in ans:
        print(i)
0