結果

問題 No.2194 兄弟の掛け引き
ユーザー n_nan_na
提出日時 2023-01-21 03:06:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 990 ms
コンパイル使用メモリ 86,664 KB
実行使用メモリ 75,620 KB
最終ジャッジ日時 2023-09-05 19:01:56
合計ジャッジ時間 3,737 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,120 KB
testcase_01 AC 82 ms
71,420 KB
testcase_02 AC 88 ms
75,280 KB
testcase_03 AC 81 ms
70,976 KB
testcase_04 AC 80 ms
71,196 KB
testcase_05 AC 83 ms
75,360 KB
testcase_06 AC 84 ms
75,476 KB
testcase_07 AC 79 ms
71,104 KB
testcase_08 AC 77 ms
71,504 KB
testcase_09 AC 80 ms
71,236 KB
testcase_10 AC 81 ms
71,348 KB
testcase_11 AC 79 ms
71,232 KB
testcase_12 AC 83 ms
75,416 KB
testcase_13 AC 79 ms
71,192 KB
testcase_14 WA -
testcase_15 AC 85 ms
75,620 KB
testcase_16 AC 78 ms
70,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

res = []
k = B//A
for n in range(1,k+1):
    if n*A-B <= 0 and C == n*A:
        res.append(n)
        break
for n in range(k+1,pow(10,5)+1):
    if n*A-B > 0 and C == n*A-B:
        res.append(n)
        break
res.sort()
if not res: print(-1)
else:
    for r in res:
        print(r)
    
0