Submeter | Todas submissőes | Melhores | Voltar |
Problem hidden
CRS - Crying Series |
Monir is a student of class 8. He loves to learn new logic from Mathematics. Divergent Geometric Series is an interesting topic to him. So, He starts practicing to find the sum of the series in his everyday life. So he pick a standard series for Nth term,
F(x) = (-1)*1 + (-1)2* 2 + (-1)3* 3 + ..... + (-1) N*N
In this case, He asks for your help to find the value (algebraic sum) of F(x) from given series. As you are a great programmer in our country.
Input
Every line of the input contains N.
Constraints
- 0 ≤ N ≤ 1015
Output
For each test case, print a single line and the value (algebraic sum of all elements) of F(x) from given series.
Example
Input: 0 1 2 Output: 0 -1 1
Adicionado por: | asad_IT |
Data: | 2018-06-24 |
Tempo limite: | 0.300s |
Tamanho do fonte: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Linguagem permitida: | Todas exceto: ASM64 CLOJURE ERL FSHARP PERL6 PY_NBC SCALA TCL |
Origem: | Math |