import sequtils,math,strutils proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord proc scanFixed(): tuple[a,b:int] = var minus = false var now = 0 var isA = true var bcnt = 10_0000_0000 while true: let k = getchar_unlocked() if k == '-' : minus = true elif k == '.': if minus : now *= -1 result.a = now now = 0 isA = false elif k < '0': if minus : now *= -1 if isA : result.a = now else: result.b = now * bcnt return else: now = 10 * now + k.ord - '0'.ord if not isA: bcnt = bcnt div 10 let n = scan() let F = newSeqWith(n,scanFixed()) let aSum = F.mapIt(it.a).sum() let bSum = F.mapIt(it.b).sum() let a = aSum + bSum div 10_0000_0000 let b = bSum mod 10_0000_0000 let B = ($b) & "0".repeat(10 - ($b).len) echo a,".",B