1 条题解
-
0
#include <bits/stdc++.h> using namespace std;
int main() { int x, y; cin >> x >> y; for (int i = x; i <= y; i++) { long long s = 1LL * i * i; if (s < 1000000 || s > 9999999) continue; int v[10] = {0}; bool ok = true; for (long long t = s; t; t /= 10 ) { int d = t % 10; if (v[d]) { ok = false; break; } v[d] = 1; } if (ok) cout << i << endl; } return 0; }
- 1
信息
- ID
- 30113
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 24
- 已通过
- 13
- 上传者