#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define bug cout << "bug" << endl
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define all(x) x.begin(), x.end()
#define F first
#define S second
#define pll pair <ll, ll>
#define pii pair <int, int>
#define triple pair <pair <ll, ll> , ll>
#define ull unsigned long long
#define ld long double
#define pinode pair <node*, node*>
const ll INF = 9e18 + 5;
const ll inf = 1e9 + 5;
const ll N = 200 + 5;
const ll shift = 2e6;
const ll mod = 998244353;
const ll mod2 = 1e9 + 9;
const ll M = 1e3 + 5;
const ll LOG = 21;
const ll sp = 263;
const ll sp2 = 9973;
const int block = 100;
const double eps = 1e-10;
ll n, q, num;
bool has(ll x){
while(x > 0){
if(x % 100 == 13)
return true;
x /= 10;
}
return false;
}
int main(){
speed;
cin >> n >> q;
cin >> num;
ll ans = 0;
for(int i = 0; i <= num; i++){
if(has(i))
continue;
ans++;
}
cout << ans << endl;
}
/*
%I64d6
6 1 3
8 1 2 1 5 4
%I64d
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
3 ms |
212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
3 ms |
212 KB |
Output is correct |
4 |
Execution timed out |
1084 ms |
212 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1067 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1067 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
3 ms |
212 KB |
Output is correct |
4 |
Execution timed out |
1084 ms |
212 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
3 ms |
212 KB |
Output is correct |
4 |
Execution timed out |
1084 ms |
212 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |