COCI '09 Contest 3 #1 Filip

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 32M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Mirko has a younger brother, Filip, who just started going to school and is having trouble with numbers. To help him get the hang for number scale, his teacher writes two three digit numbers. She asks Filip to compare those numbers, but instead of interpreting them with the leftmost most significant digit, he needs to interpret them the other way around, with the most significant digit being the rightmost one. He than has to tell the teacher the larger of the two numbers. Write a program that will check Filips answers.

Input Specification

The first and only line of input contains two three digit numbers, A and B. A and B will not be equal and will not contain any zeroes.

Output Specification

First and only line of output should contain the larger of the numbers in the input, compared as described in the task.

The number should be written reversed, to display to Filip how he should read it.

Sample Input 1

734 893

Sample Output 1


Sample Input 2

221 231

Sample Output 2


Sample Input 3

839 237

Sample Output 3



There are no comments at the moment.