当前位置:网站首页>hdu2097 nyoj414 sky数 (进制转换)
hdu2097 nyoj414 sky数 (进制转换)
2022-08-05 11:03:00 【51CTO】
Sky number
1000 ms | 内存限制: 65535
1
key天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,它的十六进制数BB0,其四位数字之和也为22,同时它的十二进制数表示1894,其四位数字之和也为22。key非常喜欢这种四位数(三种进制的和相等),由于他的发现,所以这里我们命名其为key数。但是要判断这样的数还是有点麻烦啊,那么现在请你帮忙来判断任何一个十进制的四位数,是不是key数吧。
输入含有一些四位正整数,如果为0,则输入结束。 输出 若n为Sky数,则输出“#n is a sky Number.”,否则输出“#n is not a sky Number.”。每个结果占一行。注意:#n表示所读入的n值。 样例输入
2992 1234 0
样例输出
2992 is a Sky Number. 1234 is not a Sky Number.
边栏推荐
- Android development with Kotlin programming language - basic data types
- FPGA: Basic Getting Started LED Lights Blinking
- PG优化篇--执行计划相关项
- 2022 Hangzhou Electric Power Multi-School Session 6 1008.Shinobu Loves Segment Tree Regular Questions
- 停电。。。烦烦烦!!!
- 智源社区AI周刊No.92:“计算复杂度”理论奠基人Juris Hartmanis逝世;美国AI学生九年涨2倍,大学教师短缺;2022智源大会观点报告发布[附下载]
- SQL外连接之交集、并集、差集查询
- FPGA: Use of the development environment Vivado
- Mathcad 15.0软件安装包下载及安装教程
- 用KUSTO查询语句(KQL)在Azure Data Explorer Database上查询LOG实战
猜你喜欢

Leetcode刷题——623. 在二叉树中增加一行

SQL Outer Join Intersection, Union, Difference Query

Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)

【OpenCV】-仿射变换

机器学习——逻辑回归

What are the standards for electrical engineering

微信小程序标题栏封装

PCB布局必知必会:教你正确地布设运算放大器的电路板

脱光衣服待着就能减肥,当真有这好事?

【加密解密】明文加密解密-已实现【已应用】
随机推荐
我要抓狂了。。又回到了几天不能A一道题的时候
如何选币与确定对应策略研究
Student Information Management System (first time...)
PG优化篇--执行计划相关项
FPGA:基础入门LED灯闪烁
365天挑战LeetCode1000题——Day 050 在二叉树中增加一行 二叉树
A small test of basic grammar, Go lang1.18 introductory refining tutorial, from Bai Ding to Hongru, basic grammar of go lang and the use of variables EP02
Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
Go compilation principle series 6 (type checking)
2022技能大赛训练题:交换机snmp配置
The host computer develops C# language: simulates the STC serial port assistant to receive the data sent by the microcontroller
GPU-CUDA-图形渲染分析
In-depth understanding of timeout settings for Istio traffic management
【OpenCV】-仿射变换
化繁为简!阿里新产亿级流量系统设计核心原理高级笔记(终极版)
如何测试一下现场的备机失败,转发主机的场景?
登录功能和退出功能(瑞吉外卖)
What are the standards for electrical engineering
MMDetection实战:MMDetection训练与测试
大佬们 我是新手,我根据文档用flinksql 写个简单的用户访问量的count 但是执行一次就结束