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.

15 lines
393 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
int n, cnt;
int main() {
cin >> n;
for (int i = 1; i <= n; i++)//首位不能是0
for (int j = 0; j <= n; j++)//二位可以是0
for (int k = 1; k <= n; k += 2) //三位必须是奇数1357...
if (k != i && k != j && i != j) cnt++;
cout << cnt << endl;
return 0;
}