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 shengrang at 2014-12-27 19:50:54 on Problem 3673
#include	<stdio.h>
int main ( int argc, char *argv[] )
{
    int a[2] = {0};
    int f = 0;
    char buf[500] = {0};
    scanf ( "%[^\n]",  buf);
    char *p = buf;
    while(*p !='\0')
    {
        if(*p==' ')
            f++;
        else
            a[f] += *p-'0';
        p++;
    }
    printf ( "%d\n", a[0]*a[1] );
    return 0;
}				/* ----------  end of function main  ---------- */


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