結果

問題 No.178 美しいWhitespace (1)
ユーザー osrgy01osrgy01
提出日時 2021-02-25 10:43:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 666 ms
コンパイル使用メモリ 11,764 KB
実行使用メモリ 10,132 KB
最終ジャッジ日時 2023-10-26 01:19:48
合計ジャッジ時間 2,056 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
10,068 KB
testcase_02 AC 27 ms
10,068 KB
testcase_03 AC 26 ms
10,068 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 53 ms
10,132 KB
testcase_07 AC 30 ms
10,132 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 29 ms
10,132 KB
testcase_12 AC 31 ms
10,132 KB
testcase_13 AC 54 ms
10,132 KB
testcase_14 AC 54 ms
10,132 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 30 ms
10,132 KB
testcase_19 AC 55 ms
10,132 KB
testcase_20 AC 30 ms
10,132 KB
testcase_21 WA -
testcase_22 AC 53 ms
10,088 KB
testcase_23 AC 30 ms
10,128 KB
testcase_24 AC 30 ms
10,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ans=[];t=0;chk=0
s=[]
for _ in range(n):
    a,b=map(int,input().split())
    ans.append(a+b*4)
    s.append((a+b*4)%2==0)
chk=max(ans)-min(ans)
if chk==0:
    print(0)
elif all(s):
    for i in range(n):
        t+=(max(ans)-ans[i])//2
    print(t)
else:
    print(-1)
0