結果
| 問題 |
No.178 美しいWhitespace (1)
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-06-10 04:45:02 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 425 bytes |
| コンパイル時間 | 186 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-22 23:25:35 |
| 合計ジャッジ時間 | 1,925 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 6 WA * 15 |
ソースコード
# your code goes here
N=int (input())
A=[[int (i) for i in input ().split()]for i in range (N)]
nd=0
A[0][1]=A[0][1]*4
A[0][0]+=A[0][1]
M=A[0][0]
i=1
while nd==0 and i<N-1:
A[i][1]=A[i][1]*4
A[i][0]+=A[i][1]
d=A[i][0]-A[i-1][0]
if d%2!=0:
nd=1
print (-1)
if M<A[i][0]:
M=A[i][0]
i+=1
if nd==0:
di=0
for i in range(N):
di+=M-A[0][0]
di//=2
print (di)
rocoder