結果

問題 No.1594 Three Classes
ユーザー pluto77pluto77
提出日時 2022-02-11 10:58:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 76,188 KB
最終ジャッジ日時 2024-04-28 00:47:55
合計ジャッジ時間 2,347 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
76,188 KB
testcase_01 AC 32 ms
53,376 KB
testcase_02 AC 32 ms
52,336 KB
testcase_03 AC 38 ms
61,636 KB
testcase_04 AC 86 ms
75,948 KB
testcase_05 AC 80 ms
75,624 KB
testcase_06 AC 42 ms
62,092 KB
testcase_07 AC 40 ms
63,248 KB
testcase_08 AC 79 ms
75,788 KB
testcase_09 AC 79 ms
75,652 KB
testcase_10 AC 81 ms
76,184 KB
testcase_11 AC 81 ms
75,696 KB
testcase_12 AC 80 ms
75,652 KB
testcase_13 AC 33 ms
52,464 KB
testcase_14 AC 46 ms
73,920 KB
testcase_15 AC 42 ms
67,812 KB
testcase_16 AC 39 ms
64,788 KB
testcase_17 AC 37 ms
62,348 KB
testcase_18 AC 32 ms
52,688 KB
testcase_19 AC 38 ms
59,796 KB
testcase_20 AC 37 ms
60,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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