結果
| 問題 | No.186 中華風 (Easy) |
| コンテスト | |
| ユーザー |
fmhr
|
| 提出日時 | 2015-04-19 23:59:51 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 303 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-04 19:01:38 |
| 合計ジャッジ時間 | 1,718 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 17 |
ソースコード
# coding=utf-8
x = [0] * 3
y = [0] * 3
ans = [[] for i in range(3)]
def xy(y, x):
r = []
i = 0
while x * i + y < 10 ** 6:
r.append(x * i + y)
i += 1
return r
for i in range(3):
x[i], y[i] = map(int, input().split())
for i in range(3):
ans[i] = xy(x[i], y[i])
ans2 = set(ans[0]) & set(ans[1]) & set(ans[2])
if len(ans2) == 0:
print('-1')
else:
print(min(ans2))
fmhr