240114
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include<iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
|
||||
int n;
|
||||
cin >> n;
|
||||
if (n/100==7)
|
||||
{
|
||||
cout << "Yes";
|
||||
return 0;
|
||||
}
|
||||
n%=100;
|
||||
if (n/10==7||n%10==7)
|
||||
{
|
||||
cout << "Yes";
|
||||
return 0;
|
||||
}
|
||||
cout << "No";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
幸运数字
|
||||
内存限制:1024 MB
|
||||
时间限制:5.000 S
|
||||
评测方式:文本比较
|
||||
命题人:admin
|
||||
提交:828
|
||||
解决:675
|
||||
题目描述
|
||||
富哥最近迷上了数字 7,如果一个数的某一位是 7,那么富哥则认为这个数是他的幸运数字。
|
||||
给你一个正整数 N,请判断是不是富哥的幸运数字。
|
||||
输入
|
||||
N
|
||||
100 <= N <= 999
|
||||
输出
|
||||
如果这个数是那么输出 Yes ,否则输出 No。
|
||||
样例输入 复制
|
||||
117
|
||||
样例输出 复制
|
||||
Yes
|
||||
Reference in New Issue
Block a user