for question::Jadoo and Strings on hackerearth site

using namespace std;

int main() {
    int arr[1000];
    for(int i=0;i<1000;i++){
    cin >>arr[i];
     for(int j=(count-1);j>0;j--)
     cout << arr[j];
    return 0;

I don’t think this is the code you intended to post i saw your submission in hacker earth ( in this code you are taking the input as cin>>s; but cin only takes the input till first space like if the input is “abcd efgh” your string will be take input as “abcd” but not “abcd efgh” so your output will be “dcba” not “hgfe dcba” hence wrong ans try using getline(cin,s); i used that and got AC :slight_smile: