1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
using namespace std;
int n;
bool czy(int a,int b,int c){
	if(b%a==0 && c%b==0 && a+b+c==n){
		return true;
	}
	return false;
}
int main() {
	cin >> n;
	long long suma=0;
	for(int i=3;i<n;i++){
		for(int j=2;j<i;j++){
			for(int k=1;k<j;k++){
				if(czy(k,j,i)){
					suma++;
				}
			}
		}
	}
	cout << suma;
	return 0;
}