Guest
Login
Home Page
Problems
Status
Contests
Ranklist
F.A.Qs
新函数
Time Limit:1000MS Memory Limit:32768K
Description:
数学课上,小明的老师给出一个新函数f(n)让小明算。对于任意正整数n,f(n)表示1+2+3+…+n的末位数字,随着n的增大,小明开始冒汗,请你帮小明摆平吧。
Input:
一些整数n(1≤n<1E+9),若n=0,表示运行结束。
Output:
对于每个n,输出f(n),占一行。
Sample Input:
1 2 3 5 6 0
Sample Output:
1 3 6 5 1
Hint:
f(20)=0
Source:
qn
Status
Submit
Zhe Jiang University Of Technology Online Programming Space Beta1.3
Designed & Developped By
Jin Qiwei
.
Refactored By cb@zjut.edu.cn , QQ Group: 723311416 All Copyright Reserved 2006-
403