結果
| 問題 |
No.545 ママの大事な二人の子供
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-04 12:21:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 454 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-11-23 05:43:47 |
| 合計ジャッジ時間 | 2,149 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 25 |
ソースコード
import math
sanple=int(input())
score=[]
for i in range(sanple):
score.append(list(map(int,str(input()).split(" "))))
sumscore=[0,0]
for i in range(sanple):
minscore=999**999
sumscore[0]+=score[i][0]
minscore=abs(sumscore[1]-sumscore[0])
sumscore[0]-=score[i][0]
sumscore[1]+=score[i][1]
if abs(sumscore[1]-sumscore[0])<minscore:
minscore=abs(sumscore[1]-sumscore[0])
else:
sumscore[0]+=score[i][0]
sumscore[1]-=score[i][1]
print(minscore)