Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:谁能帮忙看一下2509题怎么定义结束条件啊?

Posted by runformydream at 2009-08-22 11:51:30
In Reply To:谁能帮忙看一下2509题怎么定义结束条件啊? Posted by:15849119680 at 2009-08-22 10:50:48
while(cin>>n>>k)
	{
	sum=n;
	while(n/k>=1)
	{
		sum=sum+n/k;
		n=n/k+n%k;
	}
	cout<<sum<<endl;
	}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator