| ||||||||||
| 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 | |||||||||
各位大大看看咋错呢了?#include <stdio.h>
#define EOF (-1)
void main()
{
int n,k,a,b;
while((scanf("%d",&n)&&scanf("%d",&k))!=EOF)
{
b=n*k%(k-1);
if(b==0)
a=n*k/(k-1)-1;
else
a=n*k/(k-1);
printf("%d\n",a);
}
}
超了
换成while(scanf("%d",&n)&&scanf("%d",&k)!=EOF)则 程序错误
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator