結果
問題 |
No.178 美しいWhitespace (1)
|
ユーザー |
|
提出日時 | 2016-04-03 17:58:57 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-10-02 12:39:12 |
合計ジャッジ時間 | 1,224 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
#coding: utf-8 ##yuki_178 import sys st_max=0 ws=[] wsc=0 n=int(raw_input()) for i in xrange(n): a,b=map(int,raw_input().split()) st=a+b*4 if st>st_max: st_max=st ws.append(st) for i in ws: if (st_max-i)%2==1: print -1 sys.exit() else: wsc+=(st_max-i)/2 print wsc