CF933D.A Creative Cutout

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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

输入格式

In the first line print one integer representing .

输出格式

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

There are 55 types of lattice points where the degree of beauty of each red point is 1+2+3+4+5=151+2+3+4+5=15 , the degree of beauty of each orange point is 2+3+4+5=142+3+4+5=14 , the degree of beauty of each green point is 4+5=94+5=9 , the degree of beauty of each blue point is 55 and the degree of beauty of each gray point is 00 . Therefore, f(5)=515+414+49+85=207f(5)=5·15+4·14+4·9+8·5=207 .

Similarly, f(1)=5,f(2)=23,f(3)=50,f(4)=102f(1)=5,f(2)=23,f(3)=50,f(4)=102 and consequently .

输入输出样例

  • 输入#1

    5
    

    输出#1

    387
    
  • 输入#2

    233
    

    输出#2

    788243189
    

说明/提示

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

There are 55 types of lattice points where the degree of beauty of each red point is 1+2+3+4+5=151+2+3+4+5=15 , the degree of beauty of each orange point is 2+3+4+5=142+3+4+5=14 , the degree of beauty of each green point is 4+5=94+5=9 , the degree of beauty of each blue point is 55 and the degree of beauty of each gray point is 00 . Therefore, f(5)=515+414+49+85=207f(5)=5·15+4·14+4·9+8·5=207 .

Similarly, f(1)=5,f(2)=23,f(3)=50,f(4)=102f(1)=5,f(2)=23,f(3)=50,f(4)=102 and consequently .

首页