牛客2025年儿童节比赛题解-AB
A
两个线索。
一个线索是该题标题6.1(Easy),对应第六周周一的简单题。
还有一个是题解,注意需要在 www.nowcoder.com 里看7某3的个人主页,在竞赛站里是没有的,每个题解都藏了一个字符,按时间顺序连起来是那题的链接。
#include <bits/stdc++.h>
using namespace std;
vector<int> a = {0, 1, 5, 6, 25, 76, 376, 625, 9376, 90625, 109376, 890625, 2890625, 7109376, 12890625};
int main()
{
int ans = 0;
int n;
cin >> n;
for (auto it : a)
{
if (n >= it)
ans++;
}
cout << ans << '\n';
return 0;
}
B
自己试种子也试出来了,纯在本地暴力。