题库练习 A Creative Cutout
← 上一题 下一题 →

A11624 | A Creative Cutout

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

The first line contains one integer $m$ $(1<=m<=10^{12})$ .

输入格式

In the first line print one integer representing ![](/uploads/acgo/image/23653a312bd7dad9_62e4865e5766.jpeg).

输出格式

A piece of paper with $5$ circles is shown in the following.

![](/uploads/acgo/image/65bc93c239fe6c1a_1aef08b6cd96.jpeg)There are $5$ types of lattice points where the degree of beauty of each red point is $1+2+3+4+5=15$ , the degree of beauty of each orange point is $2+3+4+5=14$ , the degree of beauty of each green point is $4+5=9$ , the degree of beauty of each blue point is $5$ and the degree of beauty of each gray point is $0$ . Therefore, $f(5)=5·15+4·14+4·9+8·5=207$ .

Similarly, $f(1)=5,f(2)=23,f(3)=50,f(4)=102$ and consequently ![](/uploads/acgo/image/c7a1ac12d13134aa_aea9d33e2d02.jpeg).

输入输出样例

输入 #1
5
输出 #1
387
输入 #2
233
输出 #2
788243189
C++ 编辑器
输入
输出