1808: sqrt log sin

内存限制:128 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:2 通过:1

题目描述

An evil professor has just assigned you the following problem.

A sequence is defined by the following recurrence:

Determine

x1000000

.

输入格式

Input consists of a number of lines, each containing one integer, a value of i, no less than zero and no greater than one million. Input is followed by a single line containing the integer -1. This last line is not a value of i and should not be processed.

输出格式

For each value of i in the input (but not the final -1), output the corresponding value of xi modulo 1000000.

输入样例 复制

0
-1

输出样例 复制

1