Skip to content
UPEEC

LED Series Resistor

Medium#engineering#electronics· solved by 0 · time limit 2.0 s

An LED with forward voltage VFV_F needs a series resistor R=VS−VFIR = \frac{V_S - V_F}{I} to limit its current. Print the exact RR (1 decimal) and the smallest E12 standard value that is at least RR (so the current is never above the limit).

E12 values are 1.0,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.21.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2 times 100…10610^0 \dots 10^6.

Input

VSV_S (volts), VFV_F (volts) and II (milliamps).

Output

Exact resistance and the chosen E12 value (printed without trailing zeros, e.g. 330 or 1500).

Constraints

VF<VS≤300V_F < V_S \le 300, 1≤I≤10001 \le I \le 1000 mA

Sample 1

Input

5 2 10

Output

300.0 330

Sample 2

Input

12 3.2 20

Output

440.0 470

Sign in or join free to run and submit your solution.