結果
問題 |
No.1987 Sandglass Inconvenience
|
ユーザー |
|
提出日時 | 2022-06-24 22:24:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 489 bytes |
コンパイル時間 | 243 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-08 18:17:56 |
合計ジャッジ時間 | 1,802 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 6 |
ソースコード
from itertools import product L = list(map(int, input().split())) x = int(input()) for P in product(range(3), repeat=3): LL = [] for i in range(3): LL.append(L[P[i]]) for bit in range(3**3): Q = [] bitc = bit for i in range(3): Q.append(bitc % 3 - 1) bitc //= 3 res = 0 for i in range(3): res += Q[i] * LL[i] if abs(res) == x: print("Yes") exit() print("No")