結果
問題 |
No.178 美しいWhitespace (1)
|
ユーザー |
![]() |
提出日時 | 2015-10-12 13:04:14 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 47 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-07-21 07:17:07 |
合計ジャッジ時間 | 1,258 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 WA * 13 |
ソースコード
N = int(raw_input()) max = None ans = 0 for i in range(N): spc, tab = map(int, raw_input().split()) length = spc + 4 * tab if max is None: max = length elif (max - length)%2 == 1: ans = -1 break else: ans += abs(max - length)/2 print ans