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.

29 lines
744 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
/*
07 ( 0)
: 0-7 1,2,3, 4, 5, 6,7,8,
1 4 1357
2 7*4 =4*7 408-1=77*4=28
3 7*4*8
4 7*4*8*8
5 7*4*8*8*8
6 7*4*8*8*8*8
7 7*4*8*8*8*8*8
8 7*4*8*8*8*8*8*8
*/
int main() {
//加一位和两位的个数
int cnt = 4 + 4 * 7;
int x = 8;
//从3到8
for (int i = 3; i <= 8; i++) {
cnt += 7 * 4 * x;
x = x * 8;
}
printf("%d\n", cnt);
return 0;
}