# Hpuoj problem A: Do not come out Kicking association!!!

Source: Internet
Author: User

Problem A: Do not come out to kick the association!!! time limit: 1 Sec memory limit: MB
Submitted by: 291 Resolution: 33
Submitted State [Discussion Version] Title Description

This is today the most water of a problem, if not written out, hehe, play association.

Give you two integers a and b. Output a larger number, if the two-digit equal output can be any one. This water ...

Input

Input has multiple sets of test data. Each group of data has a and b two integers.

Tip: Data assurance does not have a leading 0.

Output

Outputs the final result.

Sample input
`0 0`
Sample output
`0Test instructions: Obviously a large number problemNote: Consider the case of negative numbers`
`#include <stdio.h> #include <string.h>char a[1100000],b[1100000];int n,m;int len1,len2;int main () {int i,j, Ok;while (scanf ("%s%s", A, b)!=eof) {Len1=strlen (a); Len2=strlen (b); if (a[0]== '-' &&b[0]!= '-') {printf ("%s\n", b); continue;} else if (a[0]!= '-' &&b[0]== '-') {printf ("%s\n", a); continue;} else if (a[0]== '-' &&b[0]== '-') {if (len1>len2) printf ("%s", b), else if (len1<len2) printf ("%s", a); Else{ok =1;for (i=0;i<len1;i++) {if (A[i]==b[i]) Continue;else if (A[i]>b[i]) {ok=0;printf ("%s", b); break;} else if (A[i]<b[i]) {ok=0;printf ("%s", a); break;}} if (OK) printf ("%s", a);} printf ("\ n");} Else{if (LEN1>LEN2) printf ("%s", a), else if (len1<len2) printf ("%s", b), Else{ok=1;for (i=0;i<len1;i++) {if (a[i ]==b[i]) Continue;else if (A[i]>b[i]) {ok=0;printf ("%s", a); break;} else if (A[i]<b[i]) {ok=0;printf ("%s", b); break;}} if (OK) printf ("%s", a);} printf ("\ n");}    } return 0;}`

Hpuoj problem A: Do not come out Kicking association!!!

Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.