結果
問題 |
No.178 美しいWhitespace (1)
|
ユーザー |
![]() |
提出日時 | 2021-02-25 10:45:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 57 ms / 2,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-25 09:22:10 |
合計ジャッジ時間 | 1,981 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
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 sum(s)==n or sum([i==0 for i in s])==n: for i in range(n): t+=(max(ans)-ans[i])//2 print(t) else: print(-1)