问题1148--Jingwei Tian hai

1148: Jingwei Tian hai

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 8 MB

提交

题目描述

 Emperor Yan had a daughter named Nvwa. Yan Emperor is often not at home, and the girl plays alone. However, she really wanted her father to take her out to the East China Sea, where the sun rises, which she often dreamed of. But my father was always busy with business and couldn't take her to see the sea. Finally one day, without telling her father, the girl rowed alone in a small boat to the rising sun in the East China Sea. Unfortunately, before Nvwa saw the sunrise, a strong wind suddenly blew on the sea, and the waves overturned Nvwa's boat like a mountain. The girl fell into the sea and was swallowed up by the ruthless sea. She will never come back.

 

Emperor Yan was very sad when he learned of the girl's death, but he couldn't shine the sun on the girl's body to revive her. There was only endless regret and memory with him. After the girl died, her soul turned into a bird and sounded "Jingwei, Jingwei", as if calling herself. Later, people called the bird "Jingwei".

 

"Jingwei" takes M stones from Xishan every day and puts it into the East China Sea, determined to fill the East China Sea. Today, it is often used to describe determination and fearlessness of difficulties.

输入

The input has multiple cases (no more than 100) of test data.

 

Each test case occupies one line, which are two positive integers N and M (1 <= N, M <= 10000), representing the number of stones held by "Jingwei" every day and the number of days to landfill the sea.

 

The end of input will be represented by a line of test case where N and M are equal to 0. This test case should not be processed.

输出

Each test case outputs a line, which is a positive integer, that is, the cumulative number of stones held by "Jingwei" in M days.

样例输入 Copy

1 1
0 0

样例输出 Copy

1