結果

問題 No.1594 Three Classes
ユーザー PSL24251284PSL24251284
提出日時 2021-07-10 18:14:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 76,088 KB
最終ジャッジ日時 2024-04-28 00:38:37
合計ジャッジ時間 2,311 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
76,088 KB
testcase_01 AC 39 ms
52,056 KB
testcase_02 AC 38 ms
52,192 KB
testcase_03 AC 45 ms
60,632 KB
testcase_04 AC 94 ms
75,616 KB
testcase_05 AC 94 ms
75,516 KB
testcase_06 AC 45 ms
61,148 KB
testcase_07 AC 45 ms
62,400 KB
testcase_08 AC 94 ms
75,492 KB
testcase_09 AC 95 ms
75,540 KB
testcase_10 AC 94 ms
75,620 KB
testcase_11 AC 94 ms
75,736 KB
testcase_12 AC 93 ms
75,824 KB
testcase_13 AC 38 ms
52,560 KB
testcase_14 AC 54 ms
73,684 KB
testcase_15 AC 50 ms
67,888 KB
testcase_16 AC 47 ms
64,976 KB
testcase_17 AC 46 ms
62,840 KB
testcase_18 AC 38 ms
53,324 KB
testcase_19 AC 44 ms
60,820 KB
testcase_20 AC 44 ms
61,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = list(map(int,input().split()))
for bit in range(3**N):
    x = bit
    l = [0,0,0]
    for i in range(N):
        l[x%3] += a[i]
        x //= 3
    if l[0] == l[1] == l[2]:
        print("Yes")
        exit()
print("No")
0