結果
問題 | No.178 美しいWhitespace (1) |
ユーザー |
![]() |
提出日時 | 2017-10-06 13:12:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 465 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-17 00:22:40 |
合計ジャッジ時間 | 2,017 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
n = int(input()) l = [] sum_list = [] space_sum = 0 for i in range(n): l.append(list(map(int, input().split()))) for i in range(len(l)): sum_list.append(l[i][0] + l[i][1] * 4) max = max(sum_list) def judge(array): for i in sum_list: global space_sum if (max - i) % 2 == 0: space_sum += (max - i) / 2 else: return False return True if judge(sum_list): print(int(space_sum)) else: print('-1')