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

更优美的用库函数的方法GCC

Posted by yyii1111 at 2014-09-18 12:26:41 on Problem 1504
#include <stdio.h>
#include <string.h>
char str[100];
int main() {
    int n, a, b;
    scanf("%d%*c", &n);
    while(n--) {
        gets(str);
        sscanf(strrev(str), "%d%d", &a, &b);
        sprintf(str, "%d", a + b);
        sscanf(strrev(str), "%d", &a);
        printf("%d\n", a);
    }
    return 0;
}

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