結果

問題 No.2194 兄弟の掛け引き
ユーザー n_nan_na
提出日時 2023-01-21 02:56:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 938 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 75,824 KB
最終ジャッジ日時 2023-09-05 18:52:47
合計ジャッジ時間 2,906 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,540 KB
testcase_01 AC 76 ms
75,588 KB
testcase_02 AC 76 ms
75,764 KB
testcase_03 WA -
testcase_04 AC 75 ms
75,576 KB
testcase_05 AC 75 ms
75,664 KB
testcase_06 WA -
testcase_07 AC 74 ms
75,392 KB
testcase_08 AC 75 ms
75,484 KB
testcase_09 WA -
testcase_10 AC 75 ms
75,480 KB
testcase_11 AC 75 ms
75,688 KB
testcase_12 AC 76 ms
75,440 KB
testcase_13 AC 74 ms
75,604 KB
testcase_14 WA -
testcase_15 AC 74 ms
75,600 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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