Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
45990 Jerry 四叶玫瑰数 C++ 通过 0 MS 248 KB 324 2024-04-21 19:38:15

Tests(1/1):


#include<iostream> using namespace std; int q(int x){ return x*x*x*x; } int f(int n){ int a=q(n%10); int b=q((n/10)%10); int c=q((n/100)%10); int d=q((n/1000)%10); if((a+b+c+d)==n) return 1; else return 0; } int main(){ int a,b; cin>>a>>b; for (int i=a;i<=b;i++){ if(f(i)) cout<<i<<endl; } }


测评信息: