eolymp
bolt
Try our new interface for solving problems
Məsələlər

Polindrom-ədəd

dərc olunub 19.02.17 12:12:05

Решаю через файлы ввода и вывода, все тесты - неправильный ответ, на компе все хорошо

dərc olunub 28.11.17 19:40:38

7 тест даёт ошибку

dərc olunub 03.02.24 21:05:04

Які значення до сьомого тесту?

dərc olunub 01.03.24 15:46:19

include <bits/stdc++.h>

using namespace std; int main(){ string s; cin >> s;

int size=s.length();
string s1=s;
reverse(s1.begin(),s1.end());

int result1;
stringstream(s) >> result1;
int result2;
stringstream(s1) >> result2;
if(result1==result2){
    cout << "Yes" << endl;
}
else {
    cout << "No" << endl;
}

}

dərc olunub 14.04.24 12:45:43

include <iostream>

include <string>

using namespace std;

bool isPalindrome(string str) { int left = 0; int right = str.length() - 1;

while (left < right) {
    if (str[left] != str[right])
        return false;

    left++;
    right--;
}

return true;

}

int main() { string num; cin >> num;

if (isPalindrome(num)) {
    cout << "Yes" << endl;
} else {
    cout << "No" << endl;
}

return 0;

}