main
黄海 1 year ago
parent a665b51416
commit ec6c5feff6

@ -1,3 +0,0 @@
https://blog.csdn.net/qq_36230375/article/details/134725732
https://tiku.scratchor.com/paper/view/gjfvsjrgtpm30v3f

@ -0,0 +1 @@
https://ccgao.blog.csdn.net/article/details/134725732

@ -0,0 +1,6 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
cout << '9' * 3 << endl;
return 0;
}

@ -0,0 +1,7 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int b = 0x212;
cout << b;
return 0;
}

@ -0,0 +1,8 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << n - n / 200 * 25;
return 0;
}

@ -0,0 +1,15 @@
#include <bits/stdc++.h>
using namespace std;
const int N = 10010;
int n, mx, pre, nxt;
int main() {
cin >> n >> pre;
for (int i = 2; i <= n; i++) {
cin >> nxt;
if (abs(nxt - pre) > mx) mx = abs(nxt - pre);
pre = nxt;
}
cout << mx;
return 0;
}

@ -0,0 +1,30 @@
#include <bits/stdc++.h>
using namespace std;
int check(int x) {
// 转9进制
string res;
while (x) {
int a = x % 9;
res += to_string(a);
x /= 9;
}
// 每个数位都是奇数
for (int i = 0; i < res.size(); i++)
if ((res[i] - '0') % 2 == 0) return 0;
// 判断转完的9进制是不是回文数
string str = res;
reverse(str.begin(), str.end());
return str == res;
}
int main() {
int n, m;
cin >> n >> m;
int res = 0;
for (int i = n; i <= m; i++) res += check(i);
cout << res << endl;
return 0;
}

@ -0,0 +1,3 @@
https://ccgao.blog.csdn.net/article/details/134725794
https://tiku.scratchor.com/paper/view/z8k4y0xsf0ue8xlh
Loading…
Cancel
Save