Hanging Bridge |Programming_info || python_problem_11

 At the annual "KrackerJack Karnival", there was a newest attraction ever in the City, the "Hanging Bridge". Visitors will be able to walk 200ft on the bridge, hanging around 50ft above the ground, and enjoy a wide-angle view of the breathtaking greenery.

The Hanging Bridge was inaugurated successfully in co-ordination with the Event Manager Rahul. There is a limit on the maximum number of people on the bridge and Rahul has to now ensure the count of people on the bridge currently should not exceed the limit. He then approximately estimated that adults and kids who came to the show, were on the hanging bridge. He also noticed that there are L legs of the people touching the bridge.
Rahul knows that kids love to ride on the adults and they might ride on the adults, and their legs won't touch the ground and hence he would miss counting their legs. Also Rahul knew that the adults would be strong enough to ride at max two kids on their back.
Rahul is now wondering whether he counted the legs properly or not. Specifically, he is wondering is there some possibility of his counting being correct. Please help Rahul in finding it.

 
Input Format:
The only line of input contains three space separated integers C, D, L denoting number of the adults, number of the kids and number of legs of people counted by Rahul, respectively.

Output Format:
Output a single line containing a string "yes" or "no" (both without quotes) according to the situation.
Refer sample input and output for formatting specifications.

Sample Input 1:
1 1 4

Sample Output 1:
yes

Sample Input 2:
2 4 16

Sample Output 2:
no

Solution:
a,b,c=[int(i) for i in input().split()]
if((a+b)*2>=c):
    print("yes")
else:
    print("no")

Share:

1 comment:

  1. PHP Course in Delhi
    https://onlinecoursesdelhi.educatorpages.com/pages/does-php-have-a-future-or-are-twenty-five-years-enough
    APTRON offers the best PHP course in Delhi, really suitable for working professionals who like to change their job designation in the IT industry. All worked files are shared at the end of the session by the trainer. You can choose your own timings and can save your time from traveling. Our online PHP course in Delhi does not involve video tutorials. Realtime examples are given to explain the theories and to make them understood much better. Online PHP course at APTRON Delhi provides the certification course with low fee compared to the other training institutes.

    ReplyDelete

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support