結果

問題 No.2194 兄弟の掛け引き
ユーザー ShirotsumeShirotsume
提出日時 2023-01-20 21:53:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 1,000 ms
コード長 433 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 77,304 KB
最終ジャッジ日時 2023-09-05 14:09:51
合計ジャッジ時間 3,133 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
76,808 KB
testcase_01 AC 109 ms
77,304 KB
testcase_02 AC 113 ms
77,028 KB
testcase_03 AC 108 ms
77,280 KB
testcase_04 AC 104 ms
77,036 KB
testcase_05 AC 108 ms
77,236 KB
testcase_06 AC 107 ms
76,988 KB
testcase_07 AC 107 ms
77,256 KB
testcase_08 AC 106 ms
76,908 KB
testcase_09 AC 107 ms
77,076 KB
testcase_10 AC 109 ms
77,008 KB
testcase_11 AC 108 ms
77,052 KB
testcase_12 AC 108 ms
76,952 KB
testcase_13 AC 109 ms
76,988 KB
testcase_14 AC 111 ms
77,016 KB
testcase_15 AC 109 ms
77,184 KB
testcase_16 AC 107 ms
77,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque, Counter
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

a, b, c = mi()
f = False
for i in range(1, 10 ** 6):
    now = i
    now *= a
    if now - b > 0:
        now -= b
    else:
        pass
    if now == c:
        f = True
        print(i)

if not f:
    print(-1)
0