1+ #!usr/bin/env python3
2+ from collections import defaultdict , deque , Counter , OrderedDict
3+ from bisect import bisect_left , bisect_right
4+ from functools import reduce , lru_cache
5+ from heapq import heappush , heappop , heapify
6+
7+ import itertools
8+ import math , fractions
9+ import sys , copy
10+
11+ def L (): return sys .stdin .readline ().split ()
12+ def I (): return int (sys .stdin .readline ().rstrip ())
13+ def SL (): return list (sys .stdin .readline ().rstrip ())
14+ def LI (): return [int (x ) for x in sys .stdin .readline ().split ()]
15+ def LI1 (): return [int (x ) - 1 for x in sys .stdin .readline ().split ()]
16+ def LS (): return [list (x ) for x in sys .stdin .readline ().split ()]
17+ def R (n ): return [sys .stdin .readline ().strip () for _ in range (n )]
18+ def LR (n ): return [L () for _ in range (n )]
19+ def IR (n ): return [I () for _ in range (n )]
20+ def LIR (n ): return [LI () for _ in range (n )]
21+ def LIR1 (n ): return [LI1 () for _ in range (n )]
22+ def SLR (n ): return [SL () for _ in range (n )]
23+ def LSR (n ): return [LS () for _ in range (n )]
24+
25+ def perm (n , r ): return math .factorial (n ) // math .factorial (r )
26+ def comb (n , r ): return math .factorial (n ) // (math .factorial (r ) * math .factorial (n - r ))
27+
28+ def make_list (n , * args , default = 0 ): return [make_list (* args , default = default ) for _ in range (n )] if args else [default for _ in range (n )]
29+
30+ dire = [[1 , 0 ], [0 , 1 ], [- 1 , 0 ], [0 , - 1 ]]
31+ dire8 = [[1 , 0 ], [1 , 1 ], [0 , 1 ], [- 1 , 1 ], [- 1 , 0 ], [- 1 , - 1 ], [0 , - 1 ], [1 , - 1 ]]
32+ alphabets = "abcdefghijklmnopqrstuvwxyz"
33+ ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
34+ MOD = 1000000007
35+ INF = float ("inf" )
36+
37+ sys .setrecursionlimit (1000000 )
38+
39+ def main ():
40+ A , B , C = LI ()
41+
42+ f = lambda t : A * t + B * math .sin (C * t * math .pi )
43+
44+ left , right = - 1.0 , (100 + B ) / A + 1.0
45+ epsilon = pow (10.0 , - 7 )
46+
47+ while abs (f (right ) - f (left )) > epsilon :
48+ mid = (left + right ) / 2.0
49+ if f (mid ) > 100.0 :
50+ right = mid
51+ else :
52+ left = mid
53+
54+ print (right )
55+
56+
57+
58+
59+
60+ if __name__ == '__main__' :
61+ main ()
0 commit comments