当前位置:网站首页>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-28 monkeys choose King (Joseph problem)
- Understand the application scenario and implementation mechanism of differential segment
- Niuke: crossing the river
- 剑指 Offer 28. 对称的二叉树
- tonybot 人形机器人 首次开机 0630
- 天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
- Sendmail can't send mail and it's too slow to send. Solve it
- 洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
- String substitution
- ZABBIX saves the page blank after adding calculated items
猜你喜欢

使用并行可微模拟加速策略学习

Programming language: the essence of type system

7-18 finding the single root of polynomial by dichotomy

Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块

puzzle(016.3)千丝万缕

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

表单文本框的使用(一) 选择文本

如何查询淘宝天猫的宝贝类目

Use of constraintlayout

tonybot 人形机器人 定距移动 代码编写玩法
随机推荐
Why is this error reported when modifying records in the database
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
Luogu p3065 [usaco12dec]first! G problem solution
Strategy, tactics (and OKR)
Programming language: the essence of type system
7-4 BCD decryption (10 points)
Accelerating strategy learning using parallel differentiable simulation
X86 assembly language - Notes from real mode to protected mode
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
x86汇编语言-从实模式到保护模式 笔记
adc128s022 ADC verilog设计实现
论文分享:Generating Playful Palettes from Images
7-24 reduction of the simplest fraction (rolling Division)
动态获取权限
Sendmail can't send mail and it's too slow to send. Solve it
Preliminary summary of structure
Tonybot humanoid robot infrared remote control play 0630
retrofit
Common shortcut keys in PCB
Niuke: crossing the river