結果

問題 No.1594 Three Classes
ユーザー sasa8uyauyasasa8uyauya
提出日時 2023-10-09 20:20:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 251 ms / 2,000 ms
コード長 173 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 77,232 KB
最終ジャッジ日時 2023-10-09 20:20:09
合計ジャッジ時間 5,720 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 235 ms
77,168 KB
testcase_01 AC 64 ms
71,320 KB
testcase_02 AC 64 ms
71,312 KB
testcase_03 AC 242 ms
76,968 KB
testcase_04 AC 225 ms
77,152 KB
testcase_05 AC 228 ms
77,144 KB
testcase_06 AC 240 ms
77,220 KB
testcase_07 AC 242 ms
77,232 KB
testcase_08 AC 234 ms
77,216 KB
testcase_09 AC 226 ms
77,096 KB
testcase_10 AC 250 ms
77,172 KB
testcase_11 AC 237 ms
77,172 KB
testcase_12 AC 224 ms
77,212 KB
testcase_13 AC 73 ms
76,844 KB
testcase_14 AC 250 ms
76,956 KB
testcase_15 AC 251 ms
77,112 KB
testcase_16 AC 135 ms
77,144 KB
testcase_17 AC 238 ms
77,108 KB
testcase_18 AC 67 ms
76,664 KB
testcase_19 AC 67 ms
76,800 KB
testcase_20 AC 78 ms
76,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
e=list(map(int,input().split()))
f=0
for i in range(3**n):
	p=[0,0,0]
	for j in range(n):
		p[(i//(3**j))%3]+=e[j]
	f|=p[0]==p[1]==p[2]
print(["No","Yes"][f])
0