当前位置:网站首页>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;
}边栏推荐
- China PETG market forecast and Strategic Research Report (2022 Edition)
- Mysql多表查询 #子查询
- Paper sharing: generating playful palettes from images
- Detailed explanation of four modes of distributed transaction (Seata)
- retrofit
- Accelerating strategy learning using parallel differentiable simulation
- Analysis of gene family characteristics - chromosome location analysis
- Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
- 论文分享:Generating Playful Palettes from Images
- Code writing and playing method of tonybot humanoid robot at fixed distance
猜你喜欢

x86汇编语言-从实模式到保护模式 笔记

Sub GHz wireless solution Z-Wave 800 Series zg23 SOC and zgm230s modules

Pyqt interface production (login + jump page)

编程语言:类型系统的本质

Analysis of gene family characteristics - chromosome location analysis

Jiuyi cloud black free encryption free version source code

Zhonggan micro sprint technology innovation board: annual revenue of 240million, net loss of 17.82 million, proposed to raise 600million

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

论文分享:Generating Playful Palettes from Images

【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
随机推荐
The mail function of LNMP environment cannot send mail
X86 assembly language - Notes from real mode to protected mode
Thread.sleep和TimeUnit.SECONDS.sleep的区别
7-20 print 99 formula table (format output)
7-2 and then what time (15 minutes)
Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
7-14 sum integer segments (C language)
Sub GHz wireless solution Z-Wave 800 Series zg23 SOC and zgm230s modules
JVM garbage collector
Etcd cluster permission management and account password usage
Zzuli:1047 logarithmic table
Strategy, tactics (and OKR)
Paper sharing: generating playful palettes from images
556. 下一个更大元素 III : 简单构造模拟题
Zabbix添加Calculated items后保存页面成空白
Tonybot Humanoïde Robot Infrared Remote play 0630
Zzuli:1057 prime number determination
Mongodb index
剑指 Offer 28. 对称的二叉树
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线