s1=gets.chomp.downcase.split("")
s2=gets.chomp.downcase.split("")
n=s1.length
i,f = 0,1
until n==0
if s1[i].ord<s2[i].ord
puts -1
f=0
break
elsif s1[i].ord>s2[i].ord
puts 1
f=0
break
end
n -= 1
i += 1
end
puts 0 if f==1
112A - Petya and Strings
最新推荐文章于 2022-04-16 22:02:15 发布