Skip to content

Commit 6ffb584

Browse files
committed
feat(codeforces/2067C): add new problem implementation
1 parent 0bd531d commit 6ffb584

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

codeforces/2067C/in.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
16
2+
51
3+
60
4+
61
5+
777
6+
12345689
7+
1000000000
8+
2002
9+
3001
10+
977
11+
989898986
12+
80
13+
800001
14+
96
15+
70
16+
15
17+
90

codeforces/2067C/main.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <iostream>
2+
#include <string>
3+
#include <algorithm>
4+
#include <fstream>
5+
6+
using namespace std;
7+
8+
int main() {
9+
ifstream cin("in.txt");
10+
int t;
11+
cin >> t;
12+
while (t--) {
13+
int n;
14+
cin >> n;
15+
int ans = 0;
16+
string s = to_string(n);
17+
bool hasSeven = false;
18+
for (char c : s) {
19+
if (c == '7') {
20+
hasSeven = true;
21+
break;
22+
}
23+
}
24+
if (hasSeven) {
25+
cout << 0 << endl;
26+
continue;
27+
}
28+
29+
ans = 1;
30+
cout << 1 << endl;
31+
}
32+
return 0;
33+
}

0 commit comments

Comments
 (0)