当前位置:网站首页>Zzuli:1056 lucky numbers
Zzuli:1056 lucky numbers
2022-07-03 14:35:00 【Snake_____】
Title Description
Xiao Ming has a preference for some numbers , for example , He likes it 7 Multiple , And don't like 4 Multiple , If an integer is 7 Multiple , instead of 4 Multiple , Xiao Ming will think this number is his lucky number . Now give two integers m and n, Please help Xiao Ming find it m To n The largest lucky number in the range . If m To n There are no lucky numbers in the range , The output “no”
Input
Two positive integers m and n(m < =n, And all of them are less than 10 Of 9 Power )
Output
An integer , namely m To n The largest lucky number in the range .
The sample input Copy
90 100
Sample output Copy
98
#include <stdio.h>
int main()
{
int i,m,n,c=0;
scanf("%d%d",&m,&n);
for(i=n;i>=m;i--)
{
if(i%7==0&&i%4!=0)
{
printf("%d",i);
c++;
break;
}
}
if(c==0)
{
printf("no");
}
return 0;
}
边栏推荐
- Use of constraintlayout
- Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
- Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
- NPM install is stuck with various strange errors of node NPY
- 7-28 monkeys choose King (Joseph problem)
- Puzzle (016.3) is inextricably linked
- 基因家族特征分析 - 染色体定位分析
- 剑指 Offer 28. 对称的二叉树
- Time conversion ()
- Zzuli: cumulative sum of 1050 factorials
猜你喜欢
Accelerating strategy learning using parallel differentiable simulation
7-15 calculation of PI
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Tonybot Humanoïde Robot Infrared Remote play 0630
Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in
Tiantu investment sprint Hong Kong stocks: asset management scale of 24.9 billion, invested in xiaohongshu and Naixue
Tonybot humanoid robot checks the port and corresponds to port 0701
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?
亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
剑指 Offer 28. 对称的二叉树
随机推荐
tonybot 人形机器人 查看端口并对应端口 0701
Get permissions dynamically
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
Why is this error reported when modifying records in the database
超简单手机地图开发
Programming language: the essence of type system
洛谷P5536 【XR-3】核心城市 题解
String reverse order
7-3 rental (20 points)
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?
Find specified characters
Luogu p5536 [xr-3] core city solution
X86 assembly language - Notes from real mode to protected mode
Mysql多表查询 #子查询
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
China PETG market forecast and Strategic Research Report (2022 Edition)
pyQt界面制作(登录+跳转页面)
【7.3】146. LRU caching mechanism
Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块
7-17 crawling worms (break exercise)