当前位置:网站首页>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;
}边栏推荐
- Convert string to decimal integer
- 修改数据库中的记录为什么报这个错
- JVM garbage collector
- 7-4 BCD decryption (10 points)
- Luogu p3065 [usaco12dec]first! G problem solution
- NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
- etcd集群权限管理和账号密码使用
- Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
- 基因家族特征分析 - 染色体定位分析
- Find books ()
猜你喜欢

论文分享:Generating Playful Palettes from Images

Puzzle (016.3) is inextricably linked

tonybot 人形机器人 查看端口并对应端口 0701

剑指 Offer 28. 对称的二叉树

天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库

NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon

Tonybot Humanoïde Robot Infrared Remote play 0630

一文了解微分段应用场景与实现机制

Niuke: crossing the river

Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
随机推荐
Statistical capital consonants
Some concepts about agile
DDK for XP
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
分布式事务(Seata) 四大模式详解
Common commands for getting started with mongodb database
Tiantu investment sprint Hong Kong stocks: asset management scale of 24.9 billion, invested in xiaohongshu and Naixue
洛谷P5194 [USACO05DEC]Scales S 题解
一文了解微分段应用场景与实现机制
Preliminary summary of structure
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
Tonybot humanoid robot infrared remote control play 0630
Zzuli: cumulative sum of 1050 factorials
Stop asking yourself if you are suitable for software testing
Zzuli:1057 prime number determination
Accelerating strategy learning using parallel differentiable simulation
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
tonybot 人形机器人 查看端口并对应端口 0701
The mail function of LNMP environment cannot send mail
retrofit