結果

問題 No.2194 兄弟の掛け引き
ユーザー lloyzlloyz
提出日時 2023-01-20 21:24:23
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 1,000 ms
コード長 269 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-05 13:31:34
合計ジャッジ時間 1,169 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,812 KB
testcase_01 AC 15 ms
7,796 KB
testcase_02 AC 15 ms
7,836 KB
testcase_03 AC 15 ms
7,784 KB
testcase_04 AC 15 ms
7,844 KB
testcase_05 AC 15 ms
7,880 KB
testcase_06 AC 15 ms
7,888 KB
testcase_07 AC 16 ms
7,776 KB
testcase_08 AC 15 ms
7,784 KB
testcase_09 AC 15 ms
7,936 KB
testcase_10 AC 15 ms
7,784 KB
testcase_11 AC 15 ms
7,752 KB
testcase_12 AC 15 ms
7,776 KB
testcase_13 AC 15 ms
7,856 KB
testcase_14 AC 15 ms
7,812 KB
testcase_15 AC 15 ms
7,932 KB
testcase_16 AC 15 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c = map(int, input().split())

ANS = []
if (c + b) % a == 0:
    ANS.append((c + b) // a)
if c <= b:
    if c % a == 0:
        ANS.append(c // a)

if len(ANS) == 0:
    print(-1)
else:
    ANS.sort()
    print(ANS[0])
    if len(ANS) == 2:
        print(ANS[1])
0