結果

問題 No.2194 兄弟の掛け引き
ユーザー グミ
提出日時 2023-01-20 21:44:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 270 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 62,644 KB
最終ジャッジ日時 2024-06-23 09:40:27
合計ジャッジ時間 1,402 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

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