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 hawk at 2004-02-25 00:29:12 on Problem 1008
In Reply To:上完课我还是搞不定啊!谁能帮帮我啊? Posted by:happygoodday at 2004-02-24 23:22:59
> #include<iostream.h>
> #include<string.h>
> void main()
> {
> 	int count,year,day,j,y,num,name;
> 	long int All_day;
> 	char *m[19]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax",
> 		"zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};
> 	char *n[20]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok",
> 		"chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"};
> 	char month[10];
> 	cin>>count;
> 	cout<<count<<endl;
> 	for(int i=0;i<count;i++)
> 	{
> 		cin>>day>>month>>year;
> 		for(j=0;j<19;j++)
> 		{
> 			if(strcmp(month,m[j])==0)
> 				break;
> 		}
> 		All_day=year*365+j*20+day;
> 		y=All_day/260;
> 		num=All_day%13+1;
> 		name=All_day%20;
> 		cout<<num<<" "<<n[name]<<" "<<y<<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