結果

問題 No.2812 Plus Minus Blackboard
ユーザー usatyousatyo
提出日時 2024-07-19 21:30:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 82,116 KB
実行使用メモリ 105,796 KB
最終ジャッジ日時 2024-07-21 20:26:11
合計ジャッジ時間 2,782 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
a.sort()

if sum(a) == 0 or sum(a) > 0 and sum(a[:-1]) <= 0 or sum(a) < 0 and sum(a[1:]) >= 0:
    print("Yes")
else:
    print("No")
0