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 |
Re:那个4K的PASCAL怎么弄出来的?20K的C++呢? 输入输出的内存都不够!In Reply To:那个4K的PASCAL怎么弄出来的?20K的C++呢? 输入输出的内存都不够! Posted by:Shinjikun at 2006-02-05 12:06:18 /*Result:AC*/ #include<stdio.h> typedef int NUM; #define F (924*(-((56*i+241*p-297*e)/924))+(56*i+241*p-297*e)) int main() { NUM p,e,i,d; NUM count=1; NUM D; scanf("%d %d %d %d",&p,&e,&i,&d); do { D=F*23+p-d; D%=21252; D+=21251; D%=21252; D++; printf("Case %d: the next triple peak occurs in %d days.\n",count++,D); scanf("%d %d %d %d",&p,&e,&i,&d); } while(p>=0); return 0; } /*这个还用了84KB!20KB的能不能贴出来看看?*/ Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator