当前位置:网站首页>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
- puzzle(016.4)多米诺效应
- 光猫超级账号密码、宽带账号密码 获取
- 7-17 crawling worms (break exercise)
- 动态获取权限
- Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- 【7.3】146. LRU caching mechanism
- Facebook 如何将 Instagram 从 AWS 搬到自己的服务器
- Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
猜你喜欢
![洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解](/img/89/da1a3a38e02671628f385de0f30369.png)
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解

Mysql多表查询 #子查询

Programming language: the essence of type system

How to query the baby category of tmall on Taobao

Doris学习笔记之数据表的创建

基因家族特征分析 - 染色体定位分析

tonybot 人形机器人 首次开机 0630

Adc128s022 ADC Verilog design and Implementation

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

Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块
随机推荐
洛谷P3065 [USACO12DEC]First! G 题解
7-22 tortoise and rabbit race (result oriented)
Raft agreement
Convert string to decimal integer
Puzzle (016.3) is inextricably linked
J-luggage lock of ICPC Shenyang station in 2021 regional games (simple code)
数学常数表 by q779
Zzuli:1049 square sum and cubic sum
ConstraintLayout 的使用
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
分布式事务(Seata) 四大模式详解
【7.3】146. LRU caching mechanism
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
Doris学习笔记之数据表的创建
【7.3】146. LRU缓存机制
JVM garbage collector
Accelerating strategy learning using parallel differentiable simulation
Adc128s022 ADC Verilog design and Implementation
7-3 rental (20 points)