| ||||||||||
| 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 | |||||||||
2509 老超时 有没有好的算法 阿#include<stdio.h>
#include<string.h>
int main(){
long i,j,k,m,n;
while(scanf("%ld %ld",&m,&n)!=EOF){
for(i=0;i<m;i++){
if(i%n==0)
m++;
}
printf("%ld\n",m-1);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator