結果

問題 No.1594 Three Classes
ユーザー KudeKude
提出日時 2021-07-09 21:27:56
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 291 ms
使用メモリ 81,364 KB
最終ジャッジ日時 2022-12-17 01:32:19
合計ジャッジ時間 4,168 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 171 ms
81,008 KB
testcase_01 AC 88 ms
75,716 KB
testcase_02 AC 86 ms
75,532 KB
testcase_03 AC 93 ms
80,836 KB
testcase_04 AC 165 ms
81,316 KB
testcase_05 AC 166 ms
81,124 KB
testcase_06 AC 93 ms
80,820 KB
testcase_07 AC 94 ms
80,660 KB
testcase_08 AC 165 ms
81,340 KB
testcase_09 AC 165 ms
81,216 KB
testcase_10 AC 167 ms
81,216 KB
testcase_11 AC 164 ms
81,364 KB
testcase_12 AC 164 ms
80,912 KB
testcase_13 AC 85 ms
75,564 KB
testcase_14 AC 107 ms
81,096 KB
testcase_15 AC 100 ms
81,288 KB
testcase_16 AC 99 ms
80,756 KB
testcase_17 AC 93 ms
80,940 KB
testcase_18 AC 84 ms
75,724 KB
testcase_19 AC 92 ms
80,932 KB
testcase_20 AC 96 ms
80,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
e = list(map(int, input().split()))
for s in range(3 ** n):
    p = [0] * 3
    for k in range(n):
        p[s % 3] += e[k]
        s //= 3
    if len(set(p)) == 1:
        print('Yes')
        exit(0)
else:
    print('No')
0