結果

問題 No.1374 Absolute Game
ユーザー tempura_pp
提出日時 2019-03-24 03:58:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,648 KB
最終ジャッジ日時 2024-10-02 10:09:32
合計ジャッジ時間 2,948 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve() :
    n=int(input())
    if n<2 or n>100000 :
        print("waaaaaa")
    a = list(map(int, input().split()))
    if len(a) != n : 
        print("hogeeeeeee")
    for i in a : 
        if abs(i) >1000000000 :
            print("guaaaaaaa")
    a.sort()
    x=0
    y=0
    for i in range(n) :
        if i%2 == 0 : x+=a[i]
        else : y+=a[i]
    print(abs(abs(x)-abs(y)))
solve()
0