You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int cnt;
|
|
|
|
int main() {
|
|
for (int i = 10000; i <= 19999; i++) {
|
|
int n = i;
|
|
while (n) {
|
|
if (n % 10 == 4) {
|
|
cnt++;
|
|
break;
|
|
}
|
|
n /= 10;
|
|
}
|
|
}
|
|
cout << cnt << endl;
|
|
return 0;
|
|
} |