Skip to content

Triples

Problem code: olpicpc095c19 Group: Uncategorized Problem type: Undefined

Time limit
1.0 s
Memory limit
256 MB
Points
1
AC rate
64.3%
Solvers
26

Cho số nguyên dương k. Bạn hãy tính giá trị biểu thức:

\displaystyle \sum_{a=1}^{k}\sum_{b=1}^{k}\sum_{c=1}^{k}gcd(a,b,c).

Input

  • Dòng duy nhất chứa số nguyên dương k (1 \le k \le 200).

Output

  • In ra giá trị biểu thức cần tính.

Examples

Sample Input 1
3
Sample Output 1
30
Sample Input 2
10
Sample Output 2
1249

Comments