#include <iostream>
#include <string>
using LL=long long;
using namespace std;
int main() {
LL n;
cin >> n;
LL cnt = 0;
for (LL i = 1; i <= n; i++) {
string s = to_string(i);
for (LL j = 0; j < s.size(); j++) {
if (s[j] == '2' || s[j] == '0' || s[j] == '1' || s[j] == '9') {
cnt += i;
break; // 在找到符合条件的数字后退出内层循环
}
}
}
cout << cnt;
return 0;
}
#include <iostream>
using namespace std;
const int n=20190325;
int a[n]={0,1,1,1};
int main()
{
for(int i=4;i<=n;i++)
{
a[i]=(a[i-1]+a[i-2]+a[i-3])%10000;
//注意范围
}
cout<<a[20190324];
// 请在此输入您的代码
return 0;
}
方法一:神经网络算法
#include <iostream>
using namespace std;
int main()
{
cout<<500-3-1-1-3-2;
return 0;
}
方法二:解题区cv大法(谢谢佬)
#include <iostream>
int main()
{
// 请在此输入您的代码
int aa[]={97,92,0,0,89,82,0,0,0,95,0,0,94,0,0,0,98,93,0,0};
int bb[]={90,85,0,0,83,86,0,97,0,99,0,0,91,83,0,0,83,87,0,99};
int cc[]={0,96,0,0,97,0,0,96,89,0,96,0,0,87,98,0,99,92,0,96};
int dd[]={0,0,0,80,0,0,87,0,0,0,97,93,0,0,97,93,98,96,89,95};
int ee[]={0,0,93,86,0,0,90,0,0,0,0,98,0,0,98,86,81,98,92,81};
int a,b,c,d,e,n,max=0;
for(a=1;a<20;a++){
for(b=1;b<20;b++){
for(c=1;c<20;c++){
for(d=1;d<20;d++){
for(e=1;e<20;e++){
n=aa[a]+bb[b]+cc[c]+dd[d]+ee[e];
if(max<=n&&a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e){ max=n; }
}
}
}
}
}
cout<<max;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
char a[27];
for (int i = 1; i <= 26; i++)
a[i] = (char)(65+i-1);
int x = 2019 / 26 / 26;
int y = 2019 / 26 % 26;
int z = 2019 % 26;
cout << a[x] << a[y] << a[z] << endl;
return 0;
}
更多【蓝桥杯-【蓝桥杯第十届省赛B】(部分详解)】相关视频教程:www.yxfzedu.com