# 横の境目が g の 1/2 乗によるか（ぶれなし、I/B=64、v=1.5、c=3。g=9.8 は 2.836）
import json, xsec
xsec.ZLO=1.0
for g in (4.9,19.6):
    xsec.G=g
    r=xsec.run(64.0,X0=48,hold=True,level=True,N=3000,zhi=2.0,k=8.0,seg=True,W=48.0,noise=0.0,speed=1.5)
    edge=sum(0.25*x for a,n,x in r['prof'] if x is not None)
    print(json.dumps(dict(IB=64,g=g,edge_over_rs=round(edge,3),pred=round(2.836*(g/9.8)**0.5,3))),flush=True)
