当前位置:网站首页>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;
}
边栏推荐
- 7-1 positive integer a+b (15 points)
- 亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
- ZABBIX saves the page blank after adding calculated items
- Protobuf and grpc
- 7-4 BCD decryption (10 points)
- Pyqt interface production (login + jump page)
- Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
- NPM install is stuck with various strange errors of node NPY
- Ultra simple mobile map development
- 关于敏捷的一些概念
猜你喜欢
Puzzle (016.4) domino effect
论文分享:Generating Playful Palettes from Images
How to query the baby category of tmall on Taobao
Tiantu investment sprint Hong Kong stocks: asset management scale of 24.9 billion, invested in xiaohongshu and Naixue
puzzle(016.3)千丝万缕
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
表单文本框的使用(一) 选择文本
puzzle(016.4)多米诺效应
x86汇编语言-从实模式到保护模式 笔记
Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
随机推荐
适用于XP的DDK
洛谷P5194 [USACO05DEC]Scales S 题解
Puzzle (016.4) domino effect
Tonybot humanoid robot infrared remote control play 0630
7-4 BCD decryption (10 points)
Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
Four data flows and cases of grpc
7-16 find the set of integers that meet the given conditions
分布式事务(Seata) 四大模式详解
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
Zzuli:1048 factorial table
Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
Zzuli:1043 max
Tonybot humanoid robot starts for the first time 0630
7-15 calculation of PI
Detailed explanation of four modes of distributed transaction (Seata)
Address book sorting
Zzuli: cumulative sum of 1050 factorials
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?
Raft agreement