結果
| 問題 |
No.2835 Take and Flip
|
| コンテスト | |
| ユーザー |
ねみぃ
|
| 提出日時 | 2024-08-09 21:54:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2024-08-09 21:54:25 |
| 合計ジャッジ時間 | 2,329 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | AC * 2 RE * 20 |
ソースコード
N = int(input())
num_list = []
for i in range(N):
s = int(input())
num_list.append(s)
x_list=[]
y_list=[]
num_list.sort(reverse=True)
while num_list:
num_list.sort(reverse=True)
x_list.append(num_list.pop(0))
num_list =[n*-1 for n in num_list]
if num_list :
num_list.sort(reverse=True)
y_list.append(num_list.pop(0))
num_list =[n*-1 for n in num_list]
X_sum = sum(x_list)
Y_sum = sum(y_list)
print(X_sum - Y_sum)
ねみぃ