| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
帮我看看这哪错了,不知道输入出了什么问题?In Reply To::哪位高手告诉我怎么结束输入啊?-用c语言 Posted by:zhangzujin at 2005-07-27 14:01:54 #include<stdio.h>
void main( )
{
long n,k,s,r;
while(scanf("%ld%ld",&n,&k)!=EOF)
{
s=n;
r=n/k;
while(r>0)
{
s+=r;
r/=k;
}
printf("%ld\n",s);
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator