首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
ZeroQi_404
2026年3月8日 17:42
水仙花数 题解:
P1034
回复 0
|
赞 0
|
浏览 45
#include<iostream> using namespace std; int main(){ int a,b; int i1,i2,i3; while(cin >> a >> b && (a!=0 || b!=0)){ bool flag = false; &nbs...
yhy684
2026年3月3日 17:41
水仙花数 题解:
P1034
回复 0
|
赞 18
|
浏览 278
#include<stdio.h> int get(int a,int b){ if(a<100 || b>999 || a>b){ return -1; } int count=0; for(int i=a;i<=b;i++){ int c=i%10; int...
mlx
2026年1月31日 12:20
水仙花数 题解:
P1034
回复 0
|
赞 26
|
浏览 499
#include<iostream> using namespace std; int m,n; bool check(int n) { int copy=n; int sum=0; while(copy) { int x=copy%10; sum+=x*x*x; copy/=10; } if(sum==n) return true; return false; } int main() { while(cin>>m>>n) { int cnt=0; ...
xsw
2026年1月31日 09:08
水仙花数 题解:
P1034
回复 0
|
赞 7
|
浏览 222
#include<iostream> using namespace std; bool check(int x) { int a = x / 100; int b = x / 10 % 10; int c = x % 10; return x == a * a * a + b * b * b + c * c * c; } int main() { while (true) { int m, n; cin >> m >> n; if (m == 0 && n == 0)...
奶龙大王
2026年1月25日 15:02
水仙花数 题解:
P1034
回复 0
|
赞 1
|
浏览 239
常规方法POW加取模拿位数 #include <iostream> #include <cmath> // 必须包含 cmath using namespace std; bool sx(int n){ int temp=n; int ans=0; while(temp>0){ int k=temp%10; &...
曾不会
2026年1月25日 09:19
水仙花数 题解:
P1034
回复 0
|
赞 11
|
浏览 343
#include<stdio.h> int fun(int x) { int to=0; int xx=x; int k; while(x>0) { k=x%10; to+=k*k*k; &...
无名1
2025年6月23日 13:55
水仙花数 题解:C++
P1034
回复 0
|
赞 19
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; int sumG(int a){ int sum=0; while(a!=0){ sum=sum+pow(a%10,3); a=a/10; } return sum; } int main(){ int m,n; while(cin>>m>>n&&(m!=0&&n!=0)){ bool flag=false; for(int i=m;i<=n;i++){ ...
leo110
2025年5月13日 20:29
水仙花数 题解:
P1034
回复 0
|
赞 5
|
浏览 1.1k
#include<iostream> #include<cmath> using namespace std; int flag=0; void narcissus(int n){ int tmp=n,ans(0); while(tmp){ ans+=pow((tmp%10),3); tmp/=10; ...
西电机试专家
2025年3月25日 16:14
水仙花数 题解:优美
P1034
回复 0
|
赞 12
|
浏览 1.3k
#include <bits/stdc++.h> using namespace std; int sxh(int x){ int ge=x%10; int shi=x/10%10; int bai=x/100%10; return ge*ge*ge+shi*shi*shi+bai*bai*bai; } int main(){ int a,b; ...
jaygee_
2025年3月12日 17:41
水仙花数 题解:
P1034
回复 0
|
赞 28
|
浏览 1.6k
#include<bits/stdc++.h> using namespace std; int main() { int m, n; while(cin >> m >> n) { if(m == 0 && n == 0) break; int flag = 0; for(int i = m; i <= n; i++) { int temp = i; int h = temp / 100; int s = temp / 10 % 10; int g = temp...
1
2
3
4
题目
水仙花数
题解数量
32
发布题解
在线答疑
热门题解
1
水仙花数 题解:
2
水仙花数 题解:
3
水仙花数 题解:
4
水仙花数 题解:
5
水仙花数 题解:C
6
水仙花数 题解:C++
7
水仙花数 题解:
8
水仙花数 题解:
9
水仙花数 题解:
10
水仙花数 题解: