Skip to content

Commit 96d2261

Browse files
committed
Full bridges
1 parent 2a6c2b0 commit 96d2261

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from math import*;d,s=map(int,input().split());l=0;r=1;exec("e=(l+r)/2;l,r=(e,r)if cosh(d*(1-e)/2/s/e)>1/e else(l,e);"*50);print(2*s*((1+e)/(1-e))**.5)
59.2 KB
Loading

kattis/Suspension Bridges/suspensionBridges.vn.py renamed to kattis/Suspension Bridges/bridges.vn.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Collecting beepers
2+
# https://open.kattis.com/problems/suspensionbridges/statistics
3+
# Error propagation, binary search
4+
# 29/11/2025
5+
16
from math import cosh, ceil, log2
27
d, s = map(int, input().split())
38

0 commit comments

Comments
 (0)