Problem guanine
User dieunq1309
Submission Time 2023-07-14 11:10:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

guanine.cpp: In function ‘int main()’:
guanine.cpp:25:15: error: expected ‘]’ before ‘:’ token
25 | DNA = DNA[0:ele+1];
| ^
| ]
guanine.cpp:25:15: error: expected ‘;’ before ‘:’ token
25 | DNA = DNA[0:ele+1];
| ^
| ;
guanine.cpp:30:17: error: no match for ‘operator+’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘int’)
30 | DNA = DNA[ele+1:DNA.size()-1];
| ~~~^~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from guanine.cpp:1