Horror Dash

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2899 t表示次数,换行表示一次,

#include<stdio.h>

int main(){

    char b;

    int m=0,a[10000],i,t,max;

    scanf("%d",&t);

    while(t--){

    m++;

    scanf("%d",&a[0]);

    max=a[0];

    for(i=1;(b=getchar())!='\n';i++)当遇到回车表示换行,输出答案

    {scanf("%d",&a[i]);

    if(a[i]>max)max=a[i];}

    printf("Case %d: %d\n",m,max); }

    return 0;

}

posted @ 2013-02-28 18:51  L kill  阅读(104)  评论(0编辑  收藏  举报