GLJIVE - GLJIVE
In front of Super Mario there are 10 mushrooms, arranged in a row. A certain amount of points is awarded for picking each of the mushrooms. Super Mario must pick mushrooms in order they appear, but is not required to pick them all – his goal is to score a number of points as close as possible to 100.
In case there exist two such numbers which are equally close to 100 (e.g. 98 and 102), Mario will pick the greater one (in this case 102).
Help Super Mario and tell him how many points he will score.
Input
Input consists of 10 lines, each of which contains one positive integer less than or equal to 100, denoting the scores awarded for picking each mushroom, in the order that Mario can pick them in.
Output
The first and only line of output must contain the required number of points.
Example
Input: 10 20 30 40 50 60 70 80 90 100 Output: 100
hide comments
epsilonalpha:
2017-03-08 22:29:21
Unlclear problem statement.
|
|
vineetpratik:
2017-03-06 12:59:59
My first downvote , statement of problem is unclear |
|
nilabja16180:
2017-03-04 14:10:55
AC in one Go!
|
|
scorpion_ajay:
2017-02-26 17:59:41
deserves my downvote....! |
|
shubham2305:
2017-02-06 21:07:15
1 always start adding from first.
|
|
coolio_1:
2017-01-27 20:01:00
Problem needs a bit more clarity. Comments helped a lot.
|
|
imperfectboy:
2017-01-17 08:51:28
AC in one GO !!! Read comments for help !!! |
|
vunnamtej:
2017-01-14 17:29:42
He could have explained clearly |
|
praney_rai:
2016-12-20 20:11:40
after 4 WA got AC!! really very f**king annoyed at this moment!! this ques.
|
|
shubham_cs_iet:
2016-12-11 21:02:19
@triple M, thanks for your test case, i was missing that one. |
Added by: | akaki |
Date: | 2011-02-13 |
Time limit: | 0.205s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | coci |