首页 > 编程知识 正文

敲7游戏全部数字表,敲7可以跳叫吗

时间:2023-05-04 06:58:55 阅读:266199 作者:1184

敲7

Time Limit:1000MS  Memory Limit:65536K
Total Submit:444 Accepted:219

Description

description:

输出7和7的倍数,还有包含7的数字例如(17,27,37...70,71,72,73...)

Input

input

一个整数N。(N不大于3000)

Output

output

从小到大排列的不大于N的与7有关的数字,每行一个。

Sample Input

20

Sample Output

71417

Source

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AK1136 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if (i % 7 == 0 || i % 10 == 7 || i / 10 % 10 == 7 || i / 100 % 10 == 7) Console.WriteLine(i); } } } }

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。