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