I'm on my way to solve this problem
https://open.kattis.com/problems/basketballoneonone
I solved it actually,
string a;
cin >> a;
cout << a.at(a.length()-2); //The logic
But is there any other way where we can take each number (by checking which letter was before that number) and sum it? Would really appreciate it!
Aucun commentaire:
Enregistrer un commentaire