| ||||||||||
| 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:呵呵,改了你的代码In Reply To:呵呵,改了你的代码 Posted by:qiqilrq at 2007-02-06 12:23:20 > #include <stdio.h>
> int main()
> {
> int t,i,a,b,c,tmp;
> char n[10][20];
> while(scanf("%d",&t) && t>0)
> {
> int max = 0, min = 1000000000;
> int maxi, mini;
> for(i=1;i<=t;i++)
> {
> scanf("%d%d%d%s",&a,&b,&c,n[i]);
> tmp=a*b*c;
> if(tmp > max)
> {
> max = tmp;
> maxi = i;
> }
> if(tmp < min)
> {
> min = tmp;
> mini = i;
> }
> }
> printf("%s took clay from %s.\n",n[maxi],n[mini]);
> }
> return 0;
> }
>
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator