結果

問題 No.2194 兄弟の掛け引き
ユーザー flygonflygon
提出日時 2023-01-20 21:28:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 75,860 KB
最終ジャッジ日時 2023-09-05 13:37:12
合計ジャッジ時間 2,390 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,732 KB
testcase_01 AC 75 ms
75,852 KB
testcase_02 AC 76 ms
75,700 KB
testcase_03 AC 76 ms
75,768 KB
testcase_04 AC 77 ms
75,764 KB
testcase_05 AC 77 ms
75,704 KB
testcase_06 AC 78 ms
75,676 KB
testcase_07 AC 77 ms
75,796 KB
testcase_08 AC 77 ms
75,820 KB
testcase_09 AC 77 ms
75,608 KB
testcase_10 AC 79 ms
75,852 KB
testcase_11 AC 76 ms
75,776 KB
testcase_12 AC 78 ms
75,640 KB
testcase_13 AC 78 ms
75,512 KB
testcase_14 AC 76 ms
75,620 KB
testcase_15 AC 76 ms
75,860 KB
testcase_16 AC 79 ms
75,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(10**6):
  if i * a == c and i*a <= b:
    ans.append(i)
  if i*a -b == c:
    ans.append(i)

if ans:
  for i in ans:
    print(i)
else:
  print(-1)
0