結果
問題 |
No.178 美しいWhitespace (1)
|
ユーザー |
|
提出日時 | 2015-04-24 22:33:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 270 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-05 01:21:19 |
合計ジャッジ時間 | 1,791 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 21 |
ソースコード
n = int(input()) code = [int(a) + (4 * int(b)) for a, b in map(lambda x: x.split(), iter(input, ''))] m = max(code) result = 0 perfect = 1 for n in code: d = m - n if d % 2: perfect = 0 break result += d // 2 print(result if perfect else -1)