| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1120516 | vjudge1 | Palindrome-Free Numbers (BOI13_numbers) | C++14 | 1083 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// author - alimammadzade
#include <bits/stdc++.h>
#define int long long
using namespace std;
bool free(int i) {
string s = to_string(i);
for (int i = 0; i < (int)s.size() - 1; i++)
for (int j = i + 1; j < (int)s.size(); j++) {
string a = s.substr(i, j - i + 1), b = a;
reverse(b.begin(), b.end());
if (a == b) return 0;
}
return 1;
}
signed main() {
// cin.tie(nullptr)->sync_with_stdio(false);
// system("cls"), freopen("in.txt", "r", stdin);
int a, b, res = 0;
scanf("%lld %lld", &a, &b);
for (int i = a; i <= b; i++) res += free(i);
printf("%lld", res);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
