Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

P165SUMI - ROUND 5I - Cộng trừ

Bạn hãy tính tổng S = -1 + 2 – 3 + … + ((-1) ^ n) * n.

Input

Một số nguyên n (1 <= n <= 10^15)

Output

In ra giá trị S.

Example

Test 1:
Input:
4
Output:
2
Test 2:
Input:
5
Output:
-3

Được gửi lên bởi:adm
Ngày:2016-08-05
Thời gian chạy:1s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:ASM32-GCC ASM32 MAWK BC C CSHARP C++ 4.3.2 CPP CPP14 COFFEE LISP sbcl DART FORTH GO JAVA JS-RHINO JS-MONKEY KTLN OCT PAS-GPC PAS-FPC PERL PERL6 PROLOG PYTHON PYTHON3 PY_NBC R RACKET SQLITE SWIFT UNLAMBDA

hide comments
2020-03-24 11:54:17
ahihi

Last edit: 2020-09-15 19:46:37
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.