当前位置:网站首页>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-3 count the number of words in a line of text
- Showmebug entered Tencent conference, opening the era of professional technical interview
- Add ZABBIX calculation type itemcalculated items
- Niuke: crossing the river
- X86 assembly language - Notes from real mode to protected mode
- The mail function of LNMP environment cannot send mail
- 洛谷P5536 【XR-3】核心城市 题解
- retrofit
- Zzuli:1046 product of odd numbers
猜你喜欢

Jiuyi cloud black free encryption free version source code

Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in

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)

556. 下一个更大元素 III

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

7-15 calculation of PI
![Luogu p4047 [jsoi2010] tribal division solution](/img/7f/3fab3e94abef3da1f5652db35361df.png)
Luogu p4047 [jsoi2010] tribal division solution

Tonybot Humanoïde Robot Infrared Remote play 0630

dllexport和dllimport
随机推荐
dllexport和dllimport
超简单手机地图开发
tonybot 人形机器人 红外遥控玩法 0630
7-1 positive integer a+b (15 points)
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
别再问自己适不适合做软件测试了
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
Add ZABBIX calculation type itemcalculated items
基因家族特征分析 - 染色体定位分析
Time conversion ()
7-10 stack of hats (25 points) (C language solution)
Luogu p4047 [jsoi2010] tribal division solution
洛谷P5536 【XR-3】核心城市 题解
适用于XP的DDK
Get permissions dynamically
US stock listing of polar: how can the delivery of 55000 units support the valuation of more than 20billion US dollars
如何查询淘宝天猫的宝贝类目
Mysql多表查询 #子查询
retrofit
x86汇编语言-从实模式到保护模式 笔记