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

为什么什么都输不出呢,输入之后没有输出

Posted by s13a_wxm at 2013-03-13 00:41:24 on Problem 1006
#include<stdio.h>
#include<stdlib.h>
int main()
{
	int p,e,i,j,k,d,a,n,m;
	int count=0;
	while(1)
	{
		scanf("%d,%d,%d,%d",&p,&e,&i,&d);
		if(p==-1)break;
		count++;
		for(i=28*33;i<21252;i+33)
		{
			if(i%23==p)
				break;
		}
		for(j=23*33;j<21252;j+33)
		{
			if(j%28==e)
				break;
		}
		for(k=23*28;k<21252;k+28)
		{
			if(k%33==i)
				break;
		}
		a=23*28*33;
		n=i*j*k;
		m=n%a;
		printf("Case %d: the next triple peak occurs in %d days.",count,m-d);

	}
	return 0;
}

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