Submission #14573820
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
#define step(i, s, n, d) for(int i=s; i<n; i+=d)
#define FOR(i,s,n) step(i,s,n,1)
#define rep(i,n) FOR(i,0,n)
#define ll long long
typedef pair<int, int> P;
int main(){
string a;
cin >> a;
rep(i, a.size()) {
if (a[i] == '7'){
cout << "Yes" << endl;
exit(0);
}
}
cout << "No" << endl;
}
Submission Info
| Submission Time |
|
| Task |
A - Lucky 7 |
| User |
KeitaKishida0811 |
| Language |
C++ (GCC 9.2.1) |
| Score |
100 |
| Code Size |
411 Byte |
| Status |
AC |
| Exec Time |
9 ms |
| Memory |
3600 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:3:40: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
3 | #define step(i, s, n, d) for(int i=s; i<n; i+=d)
| ^
./Main.cpp:4:20: note: in expansion of macro ‘step’
4 | #define FOR(i,s,n) step(i,s,n,1)
| ^~~~
./Main.cpp:5:18: note: in expansion of macro ‘FOR’
5 | #define rep(i,n) FOR(i,0,n)
| ^~~
./Main.cpp:12:5: note: in expansion of macro ‘rep’
12 | rep(i, a.size()) {
| ^~~
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
sample_01, sample_02, sample_03 |
| All |
hand_01, hand_02, random_00, random_02, random_03, random_04, random_05, random_06, sample_01, sample_02, sample_03 |
| Case Name |
Status |
Exec Time |
Memory |
| hand_01 |
AC |
9 ms |
3496 KiB |
| hand_02 |
AC |
2 ms |
3572 KiB |
| random_00 |
AC |
2 ms |
3456 KiB |
| random_02 |
AC |
4 ms |
3408 KiB |
| random_03 |
AC |
2 ms |
3384 KiB |
| random_04 |
AC |
2 ms |
3464 KiB |
| random_05 |
AC |
2 ms |
3460 KiB |
| random_06 |
AC |
3 ms |
3600 KiB |
| sample_01 |
AC |
2 ms |
3456 KiB |
| sample_02 |
AC |
3 ms |
3520 KiB |
| sample_03 |
AC |
3 ms |
3572 KiB |