結果
| 問題 | No.178 美しいWhitespace (1) |
| コンテスト | |
| ユーザー |
nbisco
|
| 提出日時 | 2016-03-28 22:53:16 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 22 ms / 2,000 ms |
| + 439µs | |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2026-09-08 16:35:45 |
| 合計ジャッジ時間 | 2,486 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 |
ソースコード
#!/usr/bin/env python3
#fileencoding: utf-8
max_spaces = 0
spaces = []
for i in range(int(input())):
a, b = [int(i) for i in input().strip().split(" ")]
tmp = a + b * 4
if max_spaces < tmp:
max_spaces = tmp
spaces.append(tmp)
count = 0
for i in spaces:
if ((max_spaces - i) % 2) != 0:
count = -1
break
else:
count += (max_spaces - i) // 2
print(count)
nbisco