結果

問題 No.1594 Three Classes
ユーザー mrngmrng
提出日時 2021-12-13 18:40:33
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 77,172 KB
最終ジャッジ日時 2023-08-10 07:08:41
合計ジャッジ時間 3,402 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
76,956 KB
testcase_01 AC 73 ms
71,200 KB
testcase_02 AC 72 ms
71,260 KB
testcase_03 AC 78 ms
76,568 KB
testcase_04 AC 123 ms
77,152 KB
testcase_05 AC 121 ms
76,792 KB
testcase_06 AC 79 ms
76,560 KB
testcase_07 AC 80 ms
76,512 KB
testcase_08 AC 121 ms
77,172 KB
testcase_09 AC 121 ms
76,996 KB
testcase_10 AC 119 ms
76,952 KB
testcase_11 AC 119 ms
76,956 KB
testcase_12 AC 122 ms
77,032 KB
testcase_13 AC 73 ms
71,316 KB
testcase_14 AC 90 ms
76,996 KB
testcase_15 AC 82 ms
76,528 KB
testcase_16 AC 81 ms
76,492 KB
testcase_17 AC 81 ms
76,684 KB
testcase_18 AC 72 ms
71,312 KB
testcase_19 AC 79 ms
76,548 KB
testcase_20 AC 78 ms
76,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
e = list(map(int,input().split()))
for i in range(3**n):
	c = [0]*3
	for j in range(n):
		c[i%3] += e[j]
		i //= 3
	if c[0]==c[1]==c[2]:
		print('Yes')
		break
else:
	print('No')
0