結果

問題 No.1594 Three Classes
ユーザー 河野竜也河野竜也
提出日時 2021-09-12 21:06:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,947 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 8,224 KB
最終ジャッジ日時 2023-09-06 19:45:20
合計ジャッジ時間 20,504 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,910 ms
7,788 KB
testcase_01 AC 15 ms
7,880 KB
testcase_02 AC 14 ms
8,224 KB
testcase_03 AC 50 ms
8,032 KB
testcase_04 AC 1,911 ms
7,896 KB
testcase_05 AC 1,905 ms
7,820 KB
testcase_06 AC 49 ms
8,084 KB
testcase_07 AC 94 ms
8,148 KB
testcase_08 AC 1,924 ms
7,792 KB
testcase_09 AC 1,921 ms
7,972 KB
testcase_10 AC 1,947 ms
7,828 KB
testcase_11 AC 1,923 ms
7,936 KB
testcase_12 AC 1,938 ms
7,832 KB
testcase_13 AC 15 ms
8,160 KB
testcase_14 AC 398 ms
8,120 KB
testcase_15 AC 236 ms
8,076 KB
testcase_16 AC 120 ms
8,160 KB
testcase_17 AC 84 ms
8,080 KB
testcase_18 AC 15 ms
8,028 KB
testcase_19 AC 19 ms
7,940 KB
testcase_20 AC 26 ms
8,108 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