P25491 [AtCoder] [ABC026D] Takahashi Ball 1
普及+
题目描述

Problem Description

Takahashi is skilled at baseball. He can throw a special pitch called "Takahashi Ball 1".

This ball can be represented by the function \( f(t) = A \times t + B \times \sin(C \times t \times \pi) \) where \( f(t) \) is the position of the ball \( t \) seconds after it is thrown.

You need to hit the ball at the timing when \( t \geq 0 \) and \( f(t) = 100 \). You want to find this \( t \).

Input Format

The input is given from the standard input in the following format:

\( A \) \( B \) \( C \)

  • The first line contains integers \( A, B, C \) ( \( 1 \leq A, B, C \leq 100 \) ) representing the formula of \( f(t) \), separated by spaces.

Output Format

Output a \( t \) that satisfies \( f(t) = 100 \) and \( t \geq 0 \). If there are multiple solutions, output any one of them. This problem allows for errors, and as long as \( |f(t) - 100| \leq 10^{-6} \), it will be considered correct.

End your output with a newline.

This is a problem prone to errors, so please be very careful with errors.

Sample Input and Output

Sample Input #1

1 1 1

Sample Output #1

100

Sample Input #2

53 82 49

Sample Output #2

1.63372043395339

Notes/Hints

Sample Explanation 1

When \( t = 100 \), \( f(t) = 100 \).

Sample Explanation 2

Note that there may be more than one solution.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 1 1
样例输出
100