結果

問題 No.2194 兄弟の掛け引き
ユーザー グミグミ
提出日時 2023-01-20 21:44:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 270 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 75,580 KB
最終ジャッジ日時 2023-09-05 13:58:56
合計ジャッジ時間 2,605 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,432 KB
testcase_01 AC 78 ms
71,404 KB
testcase_02 AC 78 ms
71,388 KB
testcase_03 AC 77 ms
71,380 KB
testcase_04 AC 77 ms
71,132 KB
testcase_05 AC 78 ms
71,168 KB
testcase_06 AC 78 ms
71,504 KB
testcase_07 AC 79 ms
71,392 KB
testcase_08 AC 75 ms
71,436 KB
testcase_09 AC 79 ms
71,540 KB
testcase_10 AC 77 ms
71,308 KB
testcase_11 AC 76 ms
71,388 KB
testcase_12 AC 76 ms
71,304 KB
testcase_13 AC 76 ms
71,696 KB
testcase_14 AC 81 ms
75,580 KB
testcase_15 AC 78 ms
71,432 KB
testcase_16 AC 78 ms
71,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
	a,b,c=map(int,input().split())
	ans = []
	for n in range(1,(c+b)//a+1):
		an = a*n
		anb = an-b
		c0 = anb if anb > 0 else an
		if c0 == c:
			ans.append(n)
	if len(ans) > 0:
		for n in ans:
			print(n)
	else:
		print(-1)

if __name__ == "__main__":
	main()
0