Christmas Tree Adapter
Time limit5sMemory limit1024 MB
Given a tree's ampere and an adapter's watt and volt, the task is to print 1 if the adapter's ampere (watt divided by volt) is at least the tree's ampere, otherwise 0.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Adapters (transformers) are used with many devices, such as cell phones, to convert the 110 volt coming out of the outlet. The adapter for Dr. O's Christmas tree broke, and Dr. O could not find that model online or in stores. The tree adapter showed "ampere", but the adapters online showed "watt" and "volt". So Dr. O had to consult the "Electricity 101 Book" to figure out what to buy:
- Watt: measure of power
- Volt: measure of electric potential
- Ampere: measure of current
- , so
Given the ampere for Dr. O's Christmas tree and the watt and volt for a candidate adapter, determine whether the candidate adapter will work with the tree. The adapter will work if its ampere is greater than or equal to the tree's ampere.
Input
The first line contains an integer (), the ampere for the Christmas tree. The second line contains two integers: (), the watt for the candidate adapter, and (), the volt for the candidate adapter. Assume that the input will not result in fractions in divisions.
Output
Print 1 if the candidate adapter will work with the tree, 0 (zero) otherwise.