結果

問題 No.2194 兄弟の掛け引き
ユーザー MottchanMottchan
提出日時 2023-03-28 16:08:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 325 bytes
コンパイル時間 1,141 ms
コンパイル使用メモリ 81,524 KB
実行使用メモリ 59,376 KB
最終ジャッジ日時 2023-10-20 10:19:42
合計ジャッジ時間 2,248 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#No.2194 兄弟の掛け引き

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