Problem sumint
User bribritt
Submission Time 2026-01-04 18:27:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:11:16: error: no matching function for call to ‘input()’
11 | int n = input();
| ^
sumint.cpp:5:3: note: candidate: ‘template<class T> T input()’
5 | T input(){T x;cin>>x;return x;}
| ^~~~~
sumint.cpp:5:3: note: template argument deduction/substitution failed:
sumint.cpp:11:16: note: couldn’t deduce template parameter ‘T’
11 | int n = input();
| ^
sumint.cpp:14:16: error: no matching function for call to ‘input()’
14 | a[i] = input();
| ^
sumint.cpp:5:3: note: candidate: ‘template<class T> T input()’
5 | T input(){T x;cin>>x;return x;}
| ^~~~~
sumint.cpp:5:3: note: template argument deduction/substitution failed:
sumint.cpp:14:16: note: couldn’t deduce template parameter ‘T’
14 | a[i] = input();
| ^