#142. 条件判断比较整数

    ID: 142 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatLogic-1gesp1条件结构数学基础

条件判断比较整数

Compare Integers

Background

Congcong is learning about conditional statements and needs your help to solve an interesting problem.

Problem Description

Given two integer values, return whichever value is larger. However, if the two values have the same remainder when divided by 55, then return the smaller value. In all cases, if the two values are the same, return 00. Note: the % (mod) operator computes the remainder, e.g., 7%57 \% 5 is 22.

Input Format

Input is given from standard input in the following format.

Two integers aa and bb.

Output Format

Output is printed to standard output in the following format.

An integer representing the result calculated according to the rules.

Sample

2 3
3
6 2
6
3 2
3

Sample Explanation

Sample 11: The remainders of 22 and 33 when divided by 55 are 22 and 33 respectively, which are not the same. Return the larger value, 33. Sample 22: The remainders of 66 and 22 when divided by 55 are 11 and 22 respectively, which are not the same. Return the larger value, 66. Sample 33: The remainders of 33 and 22 when divided by 55 are 33 and 22 respectively, which are not the same. Return the larger value, 33.

Constraints

Time limit for each test case is 11 second, and memory limit is 10241024 KiB.