mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-08 02:13:51 +08:00
Update: Rename folder name to XSMOJ
This commit is contained in:
27
XSMOJ/【蓝桥杯省赛】分乘整数.cpp
Normal file
27
XSMOJ/【蓝桥杯省赛】分乘整数.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include <iostream>
|
||||
#define int long long
|
||||
using namespace std;
|
||||
|
||||
signed main()
|
||||
{
|
||||
int N;
|
||||
cin >> N;
|
||||
|
||||
int count = 0;
|
||||
|
||||
for (int i = 1; i <= N / 3; ++i)
|
||||
{
|
||||
for (int j = i + 1; j <= N / 2; ++j)
|
||||
{
|
||||
int k = N - i - j;
|
||||
if (k > j && k != 3 && k != 7 && i != 3 && i != 7 && j != 3 && j != 7 && k != 0)
|
||||
{
|
||||
++count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cout << count << endl;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user