結果
問題 | No.178 美しいWhitespace (1) |
ユーザー |
![]() |
提出日時 | 2017-12-11 15:48:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-30 11:38:55 |
合計ジャッジ時間 | 1,991 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
n = int(input()) def f(n): total = 0 width = [] for i in range(n): a, b = map(int, input().split()) width.append(a + b*4) maximum = max(width) for i in width: if (maximum - i) % 2 == 0: total += (maximum - i) / 2 else: return -1 return int(total) print(f(n))