結果
| 問題 | 
                            No.178 美しいWhitespace (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ichyo
                         | 
                    
| 提出日時 | 2015-04-05 23:28:18 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 268 bytes | 
| コンパイル時間 | 72 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-07-04 02:10:23 | 
| 合計ジャッジ時間 | 1,508 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 4 | 
| other | RE * 21 | 
ソースコード
import sys
N = int(raw_input())
v = []
for i in range(N):
    a, b = map(int, raw_input().split(' '))
    v.append(int(a) + 4 * int(b))
r = max(v)
ans = sum((r - x) // 2 for x in v)
ok = all((r - x) % 2 == 0 for x in v)
if ok:
    print(ans)
else:
    print(-1)
            
            
            
        
            
ichyo