当前位置:网站首页>Make a three digit number of all daffodils "recommended collection"
Make a three digit number of all daffodils "recommended collection"
2022-07-01 22:11:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
/**
* subject : Print out all " Narcissistic number ", So-called " Narcissistic number " A three digit number ,
* The sum of its cubes is equal to the number itself . for example :153 It's a " daffodils
* Count ", because 153=1 The third power of +5 The third power of +3 The third power of
*/
public class Narcissistic number {
public static void main(String[] args) {
for (int i = 100; i < 1000; i++) {
int first = i/100;
int secode= i/10%10;
int thrid = i%10;
if (first*first*first+secode*secode*secode+thrid*thrid*thrid == i) {
System.out.println(i+" It's Narcissus ");
}
}
}
}Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/147187.html Link to the original text :https://javaforall.cn
边栏推荐
- Can I choose to open an account for stock trading on flush? Is it safe?
- PCB线路板塞孔工艺的那些事儿~
- 月入1W+的自媒体达人都会用到的运营工具
- Little p weekly Vol.11
- 股票手机开户哪个app好,安全性较高的
- Airserver mobile phone third-party screen projection computer software
- PMP证书真的有用吗?
- Fundamentals - IO intensive computing and CPU intensive computing
- Classify boost libraries by function
- 面试题:MySQL的union all和union有什么区别、MySQL有哪几种join方式(阿里面试题)[通俗易懂]
猜你喜欢

One of the basic learning of function
![[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!](/img/27/4bd0de716f5cb360d54f140dc8e9c1.png)
[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!

从MLPerf谈起:如何引领AI加速器的下一波浪潮

Little p weekly Vol.11

mysql 学习笔记-优化之SQL优化

leetcode刷题:栈与队列02(用队列实现栈)

杰理之烧录上层版物料需要【篇】

以飞地园区为样本,看雨花与韶山如何奏响长株潭一体化发展高歌

JS how to get a list of elements in a collection object

AIDL基本使用
随机推荐
ICML2022 | 基于元语义正则化的介入性对比学习
Separate the letters and numbers in the string so that the letters come first and the array comes last
测试撤销1
PCB plug hole technology~
基于LSTM模型实现新闻分类
What is the difference between consonants and Initials? (difference between initials and consonants)
BPR(贝叶斯个性化排序)
List announced | outstanding intellectual property service team in China in 2021
【深度学习】利用深度学习监控女朋友的微信聊天?
[NOIP2013]积木大赛 [NOIP2018]道路铺设 贪心/差分
都能看懂的LIS(最长上升子序列)问题[通俗易懂]
十三届蓝桥杯B组国赛
String类型转换BigDecimal、Date类型
基于YOLOv5的口罩佩戴检测方法
想请教一下,券商选哪个比较好尼?本人小白不懂,现在网上开户安全么?
【级联分类器训练参数】Training Haar Cascades
函数基本学习之一
从20s优化到500ms,我用了这三招
The correct way to set the bypass route
GCC编译