+ 2
I have a new problem in my code I never seen before
https://code.sololearn.com/c1g5EIRUj9Uy/?ref=app Do I need to optimise it, and, if yes, then how? If the problem was not caused by the optimisation issues, then, what do I have to do?
3 Antworten
+ 1
I tryed input:
5
1
5
Output gives 0, but no error.
+ 1
Martin Taylor well, it is a question for my exam, I have to write code. The numbers in the first line are s = sum of coins we need, n = number of elements in array of the coins.
Each coin has its number, it can't be less than 0 or larger than 2*10⁶ , well, we have to sort them, and say, how many ways are here to have the number of s, where s=a[x]+a[y]
0
Coding Cat sorry, I forgot to type the input/output
1 attempt:
4 5
2 2 3 2 1
2 (but it cause error)
2 attempt:
5 3
5 4 1
1
3 attempt:
4 3
5 0 5
no output