結果

問題 No.1594 Three Classes
ユーザー 河野竜也河野竜也
提出日時 2021-09-12 21:07:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 778 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 77,172 KB
最終ジャッジ日時 2023-08-10 07:07:24
合計ジャッジ時間 3,944 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
77,012 KB
testcase_01 AC 74 ms
71,456 KB
testcase_02 AC 74 ms
71,368 KB
testcase_03 AC 80 ms
76,596 KB
testcase_04 AC 121 ms
77,124 KB
testcase_05 AC 123 ms
77,028 KB
testcase_06 AC 78 ms
76,744 KB
testcase_07 AC 79 ms
76,616 KB
testcase_08 AC 124 ms
76,960 KB
testcase_09 AC 124 ms
76,864 KB
testcase_10 AC 121 ms
76,952 KB
testcase_11 AC 121 ms
77,040 KB
testcase_12 AC 120 ms
77,108 KB
testcase_13 AC 72 ms
71,456 KB
testcase_14 AC 87 ms
77,172 KB
testcase_15 AC 82 ms
76,264 KB
testcase_16 AC 80 ms
76,572 KB
testcase_17 AC 78 ms
76,580 KB
testcase_18 AC 70 ms
71,248 KB
testcase_19 AC 79 ms
76,284 KB
testcase_20 AC 76 ms
76,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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