【CSU-2185】解题报告(水题)
原始题目
2185: a simple problem
- Time Limit: 1 Sec
- Memory Limit: 128 Mb
- Submitted: 78
- Solved: 46
Description
My girlfriend loves 7 very much, she thinks it is lucky! If an integer contains one or more 7, she will think it is lucky too! ### Input There are multiple test files and each contains one case. The number of cases is at most 100. For each test case, there is only one line with an integer \(X ( 1 ≤ X ≤ {10}^{9} )\).
Output
For each test case, if \(X\) contains one or more 7, output “Lucky”(without quotation marks), otherwise output “Unlucky”(without quotation marks).
Sample Input
17171
Sample Output
Lucky
Hint
Source
题目大意
输入一串字符,字符中有7则输出“Lucky”,否则输出“Unlucky”
解题思路
逐位判断
解题代码
1 |
|
收获与反思
无
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!