結果

問題 No.2194 兄弟の掛け引き
ユーザー 👑 KazunKazun
提出日時 2023-01-20 21:23:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 1,000 ms
コード長 314 bytes
コンパイル時間 1,251 ms
コンパイル使用メモリ 86,724 KB
実行使用メモリ 75,292 KB
最終ジャッジ日時 2023-09-05 13:29:42
合計ジャッジ時間 3,237 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
75,172 KB
testcase_01 AC 78 ms
75,260 KB
testcase_02 AC 78 ms
75,220 KB
testcase_03 AC 80 ms
75,176 KB
testcase_04 AC 78 ms
75,140 KB
testcase_05 AC 79 ms
75,084 KB
testcase_06 AC 80 ms
75,140 KB
testcase_07 AC 79 ms
75,176 KB
testcase_08 AC 81 ms
75,212 KB
testcase_09 AC 81 ms
75,292 KB
testcase_10 AC 80 ms
75,088 KB
testcase_11 AC 78 ms
75,052 KB
testcase_12 AC 82 ms
75,200 KB
testcase_13 AC 81 ms
75,132 KB
testcase_14 AC 84 ms
75,072 KB
testcase_15 AC 82 ms
75,136 KB
testcase_16 AC 82 ms
75,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

    flag=0
    for N in range(1,10**6):
        if A*N>B:
            M=A*N-B
        else:
            M=A*N

        if M==C:
            flag=1
            print(N)

    if not flag:
        print(-1)

#==================================================
solve()
0