Run ID:138582

提交时间:2025-11-28 19:00:19

/* //1491 完美立方 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int m=0,n=0,a=1,b=1,c=1,d=1; cin>>n; for(a=2;a<=n;a++){ for(b=2;b<=n;b++){ for(c=2;c<=n;c++){ for(d=2;d<=n;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d && b<c && c<d){ cout<<"Cube = "<<a<<", Triple = ("<<b<<","<<c<<","<<d<<") "<<endl; } } } } } return 0; } //1492 百钱买百鸡II #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int l=1,n=0,x=1,y=1,z=1; cin>>n; for(x=0;x<=n/5;x++){ for(y=0;y<=n/3;y++){ z=n-x-y; if(5*x+3*y+z/3==n && z%3==0){ cout<<l<<": "<<x<<","<<y<<","<<z<<endl; l++; } } } if(l==1){ cout<<"None"; } return 0; }*/ //1493 不吉利的数 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int n=0,m=0,s,t; cin>>n>>m; s=m-n+1; for(int i=n;i<=m;i++){ t=i; while(t!=0){ if(t%10==4 || t%100==62){ s--; break; } t/=10; } } cout<<s<<endl; return 0; }