結果

問題 No.2194 兄弟の掛け引き
ユーザー MasKoaTS
提出日時 2023-01-20 22:04:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-06-23 10:02:19
合計ジャッジ時間 1,497 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c = map(int,input().split())
ans = set([])
if(c % a == 0):
    ans.add(c // a)
if((c + b) % a == 0):
    ans.add((c + b) // a)
    
if not(ans):
    print(-1)
    exit(0)
for k in sorted(ans):
    x = k * a
    if(x - b > 0):
        x -= b
    if(x != c):
        continue
    print(k)
    
0