結果

問題 No.2194 兄弟の掛け引き
ユーザー はとはと
提出日時 2023-07-17 20:06:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 506 ms / 1,000 ms
コード長 301 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,620 KB
実行使用メモリ 9,976 KB
最終ジャッジ日時 2023-10-18 00:36:14
合計ジャッジ時間 8,955 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 435 ms
9,976 KB
testcase_01 AC 435 ms
9,976 KB
testcase_02 AC 434 ms
9,976 KB
testcase_03 AC 418 ms
9,976 KB
testcase_04 AC 436 ms
9,976 KB
testcase_05 AC 430 ms
9,976 KB
testcase_06 AC 427 ms
9,976 KB
testcase_07 AC 437 ms
9,976 KB
testcase_08 AC 435 ms
9,976 KB
testcase_09 AC 428 ms
9,976 KB
testcase_10 AC 457 ms
9,976 KB
testcase_11 AC 479 ms
9,976 KB
testcase_12 AC 506 ms
9,976 KB
testcase_13 AC 489 ms
9,976 KB
testcase_14 AC 419 ms
9,976 KB
testcase_15 AC 488 ms
9,976 KB
testcase_16 AC 425 ms
9,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C = map(int, input().split())
N = 0
number = 0
result = []
for N in range(10**6):
    N = N + 1
    if A*N > B:
        number = A*N - B
    else:
        number = A*N
    if number == C:
        result.append(N)
if len(result) > 0:
    for i in result:
        print(i)
else:
    print(int(-1))
0