hdu 1703

#include<stdio.h>
#define  N  11000
int a[N];
int main() {
    int i,n;
    a[1]=0;a[2]=5;a[3]=15;a[4]=20;
    a[5]=30;
    for(i=6;i<=10000;i++)
        a[i]=a[i-1]+10;
    while(scanf("%d",&n),n) {
        printf("%d ",a[n]);
    }
return 0;
}
原文地址:https://www.cnblogs.com/thefirstfeeling/p/4410746.html