I think that you should use long double when dividing numbers, because some results might come too big when trying to multiply.
Some data for testing perhaps:
100 6
23 5
34 20
17 9
98 6
88 12
67 21
34 34
12 11
90 6
80 7
70 7
60 8
50 9
45 10
These should be the correct answers:
1192052400
33649 ...
Search found 3 matches
- Mon Jan 20, 2003 5:57 pm
- Forum: Volume 3 (300-399)
- Topic: 369 - Combinations
- Replies: 101
- Views: 33251
- Sun Jan 19, 2003 7:03 pm
- Forum: Volume 1 (100-199)
- Topic: 119 - Greedy Gift Givers
- Replies: 145
- Views: 47241
- Fri Jan 03, 2003 5:41 pm
- Forum: Volume 1 (100-199)
- Topic: 119 - Greedy Gift Givers
- Replies: 145
- Views: 47241
Problem with 119
I have a problem with 119, I get WA. I dont know what is wrong with my code.
Here you can find my code
Do I understand correctly that all input comes at once and after input reads EOF, then comes output all in groups separeated by blank line???
Here you can find my code
Do I understand correctly that all input comes at once and after input reads EOF, then comes output all in groups separeated by blank line???