結果

問題 No.2194 兄弟の掛け引き
ユーザー machoniumpmachoniump
提出日時 2023-09-18 20:17:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 304 ms / 1,000 ms
コード長 170 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-18 20:17:50
合計ジャッジ時間 5,860 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 273 ms
7,792 KB
testcase_01 AC 246 ms
7,804 KB
testcase_02 AC 294 ms
7,740 KB
testcase_03 AC 245 ms
7,936 KB
testcase_04 AC 248 ms
7,792 KB
testcase_05 AC 245 ms
7,844 KB
testcase_06 AC 252 ms
7,872 KB
testcase_07 AC 249 ms
7,752 KB
testcase_08 AC 285 ms
7,944 KB
testcase_09 AC 243 ms
7,780 KB
testcase_10 AC 260 ms
7,832 KB
testcase_11 AC 304 ms
7,820 KB
testcase_12 AC 266 ms
7,876 KB
testcase_13 AC 266 ms
7,820 KB
testcase_14 AC 258 ms
7,820 KB
testcase_15 AC 295 ms
7,924 KB
testcase_16 AC 252 ms
7,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c=map(int,input().split())
cnt=0
for i in range(1,10**6):
    s=a*i-b
    if s<=0:
        s+=b
    if s==c:
        print(i)
        cnt+=1
if cnt==0:
    print(-1)
0