ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2012. About Grisha N.

Python 3.4: Why my solution is wrong?
Posted by Nabi 19 Jul 2017 13:19
a=int(input())
tasks_left=12-a
if tasks_left*45<=240:
    print('TRUE')
else:
    print('FALSE')
Re: Python 3.4: Why my solution is wrong?
Posted by Mahilewets 19 Jul 2017 14:35
Because you should output "YES" /"NO" ,  not "TRUE" /"FALSE"
Re: Python 3.4: Why my solution is wrong?
Posted by Nabi 21 Jul 2017 10:33


Edited by author 21.07.2017 10:33
Re: Python 3.4: Why my solution is wrong?
Posted by Nabi 21 Jul 2017 10:35
but it doesnt work.
a=int(input('input solved task:'))
tasks_left=12-a
if tasks_left*45<=240:
    print('YES')
else:
    print('NO')
Re: Python 3.4: Why my solution is wrong?
Posted by Mahilewets 21 Jul 2017 11:37
Please look what is your output
http://ideone.com/9Nr0UJ

You should output only YES/NO
Re: Python 3.4: Why my solution is wrong?
Posted by Nabi 24 Jul 2017 13:19
Thanks. Now it's work.
i've changed from
a=int(input('input solved task:'))
to
a=int(input())