LearnPy Hub
← Arena
IntermediateRating 1200

Which Version Is Newer?

Version numbers are numbers joined by dots, like 1.2.10. Compare them part by part as numbers; a missing part counts as 0. Print -1 if the first is older, 1 if newer, 0 if equal.

Input

Two version strings, one per line.

Output

-1, 0 or 1.

Sample 1

Input
1.01
1.001
Output
0

Sample 2

Input
1.0
1.0.0
Output
0
solution.py
Output appears here
Which Version Is Newer? · Python Arena problem · LearnPy Hub