結果

問題 No.2194 兄弟の掛け引き
ユーザー kukutoni
提出日時 2023-06-30 14:43:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-07 02:35:09
合計ジャッジ時間 1,790 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 8 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for N in range(1, B+C):
    num = N
    num *= A  # 兄が整数をA倍する
    num -= B  # 弟が整数からBを引く
    if num <= 0:
        continue
    if num == C:
        possible_N.append(N)

if len(possible_N) > 0:
    for N in possible_N:
        print(N)
else:
    print(-1)
0