| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 81297 | sh25_zhangjiajia | 填算式(蓝桥杯真题) | C++ | 通过 | 14 MS | 244 KB | 614 | 2026-01-04 15:45:01 |
#include<iostream> #include<algorithm> #include<cstdio> #include<queue> #include<stack> #include<cstring> using namespace std; int t[10]; void chai(int x){ while(x){ t[x%10]++; x/=10; } return; } int main(){ int cnt=0; for(int a=111;a<=999;a++){ for(int b=111;b<=999;b++){ memset(t,0,sizeof(t)); int c=a+b; chai(a);chai(b);chai(c); if(t[0]>0){ continue; } bool flag=true; for(int i=1;i<=9;i++){ if(t[i]==0||t[i]>1){ flag=false; break; } } if(flag){ cnt++; } } } cout<<cnt; return 0; }