CF433B Kuriyama Mirai's Stones

Description

Kuriyama Mirai has killed many monsters and got many (namely $ n $ ) stones. She numbers the stones from $ 1 $ to $ n $ . The cost of the $ i $ -th stone is $ v_{i} $ . Kuriyama Mirai wants to know something about these stones so she will ask you two kinds of questions: 1. She will tell you two numbers, $ l $ and $ r (1

Input Format

The first line contains an integer $ n (1

Output Format

Print $ m $ lines. Each line must contain an integer — the answer to Kuriyama Mirai's question. Print the answers to the questions in the order of input.

Explanation/Hint

Please note that the answers to the questions may overflow 32-bit integer type.