## A

chomp的作用是去掉'\n'字符，如果不加的话gets最后会有个'\n'

```a,b=gets.chomp.split().map(&:to_i)
if a<b
print '<'
elsif a==b
print '='
else
print '>'
end```

## B

```a=gets.to_i
if a&1==1
print 3*a+1
else
print a/2
end```

## C

```a,b=gets.chomp.split().map(&:to_i)
if a==b
print 'Tacit！'
else
print 'No Tacit!'
end```

## D

```a,b=gets.split().map(&:to_i)
if a%b==0
print 'YES'
else
print 'NO'
end```

## E

```a,b=gets.split().map(&:to_i)
if b%a==0
print a+b
else
print b-a
end```

## F

cf原题。注意需要判断2不能拆成两个正偶数之和。

```a=gets.to_i
if a%2==0 and a>2
print 'YES, you can divide the watermelon into two even parts.'
else
print 'NO, you can\'t divide the watermelon into two even parts.'
end```

## G

```a=gets.to_i
if a&1==1
print a
else
print -1
end```

## H

```a,b,n=gets.split().map(&:to_i)
if a+b<=n and (a+b+n)%2==0
print "YES"
else
print "NO"
end```

## I

```a=gets.to_i
if a%2==0 and a>50
print "yes"
else
print "no"
end```

## J

```n=gets.to_i
if n%400==0
print 'yes'
elsif n%100==0
print 'no'
elsif n%4==0
print 'yes'
else
print 'no'
end```

## K

```a=gets.split().map(&:to_i)
c1,c2,c3=0,0,0
for i in 0..a.length-1
if a[i]>0
c1+=1
elsif a[i]<0
c2+=1
end
end
print 'positive:'
puts c1
print 'negative:'
puts c2```

## L

```a,b,c=gets.split().map(&:to_i)
if a+b+c>=180
print 'NO'
else
print 'YES'
end```

## M

```a=gets.split().map(&:to_i)
print 'The maximum number is : '
puts a.max
print 'The minimum number is : '
puts a.min
```

## N

```a=gets.to_i
b=gets.to_i
c=gets.to_i
s=[a+b+c,a*b*c,(a+b)*c,a*(b+c)]
print s.max```

## O

```a=gets.to_i%100
if a<=2
print 'winter'
elsif a<=5
print 'spring'
elsif a<=8
print 'summer'
elsif a<=11
print 'autumn'
else
print 'winter'
end```

## P

```a,b,c=gets.split('-').map(&:to_i)
if b<10 or (b==10 and c<29)
print 'No. It\'s not too late.'
else
print 'QAQ'
end```

## Q

```a,b,c=gets.chomp.split('-').map(&:to_i)
m=[1,31,28,31,30,31,30,31,31,30,31,30,31]
def f(x)
if x%4!=0
return 0
end
if x%100!=0
return 1
end
if x%400!=0
return 0
end
return 1
end
c-=2
if c<=0
b-=1
if b<=0
a-=1
b=12
end
c+=m[b]
if b==2
c+=f(a)
end
end
print '0'*(4-a.to_s.length)
print a
print '-'
print '0'*(2-b.to_s.length)
print b
print '-'
print '0'*(2-c.to_s.length)
print c```

## R

```n=gets.to_f
n=n*12*2.54*10
if n==n.to_i
print n.to_i
else
print (n).round(1)
end```

## S

```a=gets.to_i
puts a/2+a%2```

## T

```n,a,b=gets.split().map(&:to_i)
print [n-a,b+1].min```

## U

```n=gets.to_i
a,b,c=n*10/100,n*20/100,n*30/100
a1,b1,c1=a,b,c
cnt=0
if n*10%100!=0
cnt+=1
end
print cnt
print ' '
if n*20%100!=0
cnt+=1
end
print cnt
print ' '
if n*30%100!=0
cnt+=1
end
print cnt
print ' '```

## V

```ma,m1=0,0
for i in 1..7
a,b=gets.split().map(&:to_i)
if ma<a+b
ma,m1=a+b,i
end
end
if ma>8
print m1
else
print 0
end```

## W

```a=gets
s=a[0].to_i+a[2].to_i*2+a[3].to_i*3+a[4].to_i*4+a[6].to_i*5+a[7].to_i*6+a[8].to_i*7+a[9].to_i*8+a[10].to_i*9
if s%11==10
if a[12]=='X'
print 'Right'
else
for i in 0..a.length-3
print a[i]
end
print 'X'
end
elsif s%11==a[12].to_i
print 'Right'
else
for i in 0..a.length-3
print a[i]
end
print s%11
end```