4008 - CS

Created by V Copa UPR - Elio Alejandro Govea Aguilar
Added by eliogovea (2018-05-24)
Limits
Total Time: 45000 MS | Test Time: 1000 MS |Memory: 512 MB | Output: 64 MB | Size: 16 KB
Enabled languages
Available in

Description

Find the number of ways to select four different points with integer coordinates such that 0 <= x <= n, 0 <= y <= n and form a square module 1000000007.
Calcule la cantidad de formas de seleccionar cuatro puntos distintos con coordenadas enteras tal que  0 <= x <= n, 0 <= y <= n y formen un cuadrado módulo 1000000007.
;jsessionid=A619DA45229CF2AD9546F31BF55103D9
Find the number of ways to select four different points with integer coordinates such that 0 <= x <= n, 0 <= y <= n and form a square module 1000000007.

Input specification

A line with a number n (1 <= n <= 1e18).
Una linea con un numero n (1 <= n <= 1e18). ;jsessionid=A619DA45229CF2AD9546F31BF55103D9
A line with a number n (1 <= n <= 1e18).

Output specification

The answer to the problem module 1000000007.
La respuesta al problema módulo 1000000007.
A line with a number n (1 <= n <= 1e18).

Sample input

1

Sample output

1

Hint(s)

http://coj.uci.cu/contest/
http://coj.uci.cu/contest/
http://coj.uci.cu/contest/