結果

問題 No.1374 Absolute Game
ユーザー tempura_pptempura_pp
提出日時 2019-03-24 03:58:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,652 KB
最終ジャッジ日時 2024-04-10 08:27:25
合計ジャッジ時間 2,692 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 26 ms
10,752 KB
testcase_05 AC 27 ms
10,624 KB
testcase_06 AC 25 ms
10,752 KB
testcase_07 AC 27 ms
10,752 KB
testcase_08 AC 46 ms
13,796 KB
testcase_09 AC 80 ms
18,872 KB
testcase_10 AC 89 ms
20,296 KB
testcase_11 AC 61 ms
16,420 KB
testcase_12 AC 45 ms
14,056 KB
testcase_13 AC 73 ms
17,988 KB
testcase_14 AC 96 ms
21,648 KB
testcase_15 AC 93 ms
21,524 KB
testcase_16 AC 94 ms
21,652 KB
testcase_17 AC 96 ms
21,648 KB
testcase_18 AC 97 ms
21,520 KB
testcase_19 AC 95 ms
21,648 KB
testcase_20 AC 50 ms
14,500 KB
testcase_21 AC 58 ms
16,072 KB
testcase_22 AC 93 ms
21,144 KB
testcase_23 AC 33 ms
11,904 KB
testcase_24 AC 35 ms
12,416 KB
testcase_25 AC 38 ms
12,664 KB
testcase_26 AC 46 ms
14,044 KB
testcase_27 AC 54 ms
15,652 KB
権限があれば一括ダウンロードができます

ソースコード

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