Created
April 17, 2020 15:39
-
-
Save Youngestdev/a75a3daeeba1bb00514f5e675cdf9466 to your computer and use it in GitHub Desktop.
Google Kickstart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| T = int(input()) | |
| count = 0 | |
| f = 0 | |
| if T is None or T is 0: | |
| pass | |
| while f < T: | |
| count += 1 | |
| n, b = map(int, input().split()) | |
| c = (input().split()) | |
| c = sorted(c) | |
| ans = 0 | |
| for i in range(n): | |
| if b >= int(c[i]): | |
| ans += 1 | |
| b -= int(c[i]) | |
| print("Case #{}: {}".format(count, ans)) | |
| f += 1 | |
Author
Oh, where? I no sabi C++ but then Python is too slow for competitive programming.
Author
What language do you intend to use? We might learn - I remember we planned to jump into it together lol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I still have a long way to go with competitive programming. I already started a course today sef.