Here is my solution for the KAMIL problem , but it is not passing the 256 bytes test case.
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
using namespace std;
int main(){
vector<string>input;
string temp;
for (int i = 0; i < 10; i++){getline(cin, temp);input.push_back(temp);}
for (int i = 0; i < 10; i++){
int counter = 0;
for (int j = 0; j < input[i].length(); j++){
if (input[i][j] == 'D' || input[i][j] == 'F' || input[i][j] == 'L' || input[i][j] == 'T'){ counter++; }
}
cout << pow(2,counter) << endl;
}
cin.get();
return 0;
}
Can someone who has solved the problem using c++ , guide me as to what I am doing wrong or how can i improve it? It seems to be working perfectly fine on my system and I have also tried removing all comments,white spaces and newlines and compressed it to a single line but I am still getting the same error.