'commit'
This commit is contained in:
19
TangDou/LuoGuBook/20_1_8.cpp
Normal file
19
TangDou/LuoGuBook/20_1_8.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user