@@ -0,0 +1,428 @@
+# coding: utf-8%0A#%0A# %E7%B5%90%E6%9E%9C https://paiza.jp/poh/joshibato/rio/result/62050e0a%0A#%0A%0An = int(raw_input())%0A%0Aw = 0.0%0Ac = 0.0%0A%0Afor i in xrange(n):%0A    t, x = map(int, raw_input().split())%0A    s = float(x)%0A    if t == 1:%0A        w += s%0A    elif t == 2:%0A        c += s%0A    else:%0A        wc = w + c%0A        tw = (w * wc - s * w) / wc%0A        tc = (c * wc - s * c) / wc%0A        w = tw%0A        c = tc%0A%0Aans = int(100.0 * c / (w + c))%0A%0Aprint ans%0A

Create answer.py2.py