結果

問題 No.1594 Three Classes
ユーザー TadaTada
提出日時 2021-07-09 21:35:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 596 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 76,824 KB
最終ジャッジ日時 2023-08-10 06:44:01
合計ジャッジ時間 7,850 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 596 ms
76,776 KB
testcase_01 AC 70 ms
71,332 KB
testcase_02 AC 70 ms
71,180 KB
testcase_03 AC 92 ms
76,132 KB
testcase_04 AC 591 ms
76,648 KB
testcase_05 AC 595 ms
76,636 KB
testcase_06 AC 93 ms
76,592 KB
testcase_07 AC 105 ms
76,084 KB
testcase_08 AC 595 ms
76,672 KB
testcase_09 AC 594 ms
76,760 KB
testcase_10 AC 593 ms
76,620 KB
testcase_11 AC 594 ms
76,824 KB
testcase_12 AC 593 ms
76,480 KB
testcase_13 AC 71 ms
71,372 KB
testcase_14 AC 187 ms
76,196 KB
testcase_15 AC 141 ms
76,212 KB
testcase_16 AC 109 ms
76,296 KB
testcase_17 AC 101 ms
76,420 KB
testcase_18 AC 69 ms
71,200 KB
testcase_19 AC 83 ms
76,324 KB
testcase_20 AC 84 ms
76,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
E=list(map(int,input().split()))


for i in range(3**N):
    s0=0
    s1=0
    s2=0
    for j in range(N):
        if i//3**j%3==0:
            s0+=E[j]
        if i//3**j%3==1:
            s1+=E[j]
        if i//3**j%3==2:
            s2+=E[j]
    #print(s0,s1,s2)
    if s0==s1==s2:
        print("Yes")
        exit()
print("No")
0