結果

問題 No.178 美しいWhitespace (1)
ユーザー GrayCoderGrayCoder
提出日時 2018-06-03 05:09:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 329 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 8,392 KB
最終ジャッジ日時 2023-09-12 21:44:11
合計ジャッジ時間 1,668 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 15 ms
7,868 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 17 ms
8,364 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 17 ms
8,180 KB
testcase_12 AC 17 ms
8,328 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 17 ms
8,184 KB
testcase_19 WA -
testcase_20 AC 17 ms
8,332 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 17 ms
8,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

def main():
    N = int(input())
    L = stdin.read().splitlines()

    num = [sum(a * 4 if i % 2 else a for i, a in enumerate(map(int, j.split()))) for j in L]
    judge = len({map(lambda x: x % 2, num)}) - 1
    if judge:
        print((max(num) * N - sum(num)) // 2)
    else:
        print(-1)

main()
0