Problem:


Score : 100 points

Problem Statement

Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right.
We will call the arrangement of the poles beautiful if the tops of the poles lie on the same line, that is, b-a = c-b.

Determine whether the arrangement of the poles is beautiful.

Constraints

1 \leq a,b,c \leq 100

a, b and c are integers.

Input

Input is given from Standard Input in the following format:

a b c

Output

Print YES if the arrangement of the poles is beautiful; print NO otherwise.

Sample Input 1

2 4 6

Sample Output 1

YES

Since 4-2 = 6-4, this arrangement of poles is beautiful.

Sample Input 2

2 5 6

Sample Output 2

NO

Since 5-2 \neq 6-5, this arrangement of poles is not beautiful.

Sample Input 3

3 2 1

Sample Output 3

YES

Since 1-2 = 2-3, this arrangement of poles is beautiful.



Sample input:
2 4 6


Sample output:
YES

Submission status: Runtime Error

Solution code:
a,b,c = map(raw_input().split(), int)
if a+c == 2*b:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a,b,c = map(raw_input().split(), int)
2.if a+c == 2*b:
3.    print('YES')
4.else:
5.    print('NO')

Submission status: Runtime Error

Solution code:
a,b,c = map(input().split(), int)
2.if a+c == 2*b:
3.    print('YES')
4.else:
5.    print('NO')

Submission status: Runtime Error

Solution code:
a,b,c = map(input().split(), int)
if a+c == 2*b:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a,b,c = [int(i) for i in input().split()]
print("YES" if b-a==c-b "NO")

Submission status: Runtime Error

Solution code:
from string import ascii_lowercase

n = int(input())
ans_l = [100 for i in range(26)]

for i in range(n):
    s = str(input())
    for i, j in enumerate(ascii_lowercase):
        ans_l[i] = min(ans_l[i], s.count(j))
print("".join(i * j for i, j in zip(ascii_lowercase, ans_l)))

Submission status: Runtime Error

Solution code:
s_vec1 = input()
s_vec2 = input()
def abc_057_2(o,e):
    s_vec3 = []
    for i in range(0,len(e)):
        s_vec3.append(o[i])
        s_vec3.append(e[i])
    if len(o) == len(e):
        pass
    else:
        s_vec3.append(o[i+1])
    return(''.join(s_vec3))
print(abc_057_2(s_vec1,s_vec2))

Submission status: Runtime Error

Solution code:
s_vec1 = input()
s_vec2 = input()
def abc_057_2(o,e):
    s_vec3 = []
    for i in range(0,len(e)):
        s_vec3.append(o[i])
        s_vec3.append(e[i])
    if len(o) == len(e):
        pass
    else:
        s_vec3.append(o[i+1])
    return(''.join(s_vec3))  
abc_057_2(s_vec1,s_vec2)

Submission status: Runtime Error

Solution code:
import sys

a = int(input())
b = int(input())
c = int(input())

if b - a == c - b:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a,b,c = int(input()), int(input()), int(input())

if b - a == c - a:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a,b,c=input(),split()
if (int(b)-int(a))==(int(c)-int(b)):
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
a,b,c=input().split()
if (int(b)-int(a)==(int(c)-int(b):
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
a,b,c=split(input())
if (int(b)-int(a)==(int(c)-int(b):
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
# -*- conding: utf-8 -*-

a = int(raw_input())
b = int(raw_input())
c = int(raw_input())

if (b - a) - (c - b) == 0:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- conding: utf-8 -*-

a = int(raw_input())
b = int(raw_input())
c = int(raw_input())

if (b - a) - (c - b) == 0:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
#!/usr/local/env python
# -*- conding:utf-8 -*-

import sys

a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])

if (b - a) - (c - b) == 0:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
odds = input()
evens = input()

result = ""
while (not(len(odds) == 0 and len(evens) == 0)):
   if (len(odds) != 0):
      result += odds[0]
      odds = odds[1:]
   if (len(evens) != 0):
      result += evens[0]
      evens = evens[1:]

print(result)

Submission status: Runtime Error

Solution code:
n = int(raw_input())
list_str = []
for count in range(0,n):
    list_str.append(raw_input())

for count in range(0,n-1):
    if count == 0:
        compare1 = set(list_str[count])
    else:
        compare1 = set(output)
    compare2 = set(list_str[count+1])
    output = list(compare1 & compare2)
output = ''.join(output)
print output

Submission status: Runtime Error

Solution code:
n = map(int, raw_input().split())
list_str = []
for count in range(0,n):
    list_str.append(raw_input())

for count in range(0,n-1):
    if count == 0:
        compare1 = set(list_str[count])
    else:
        compare1 = set(output)
    compare2 = set(list_str[count+1])
    output = list(compare1 & compare2)
output = ''.join(output)
print output

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input())
if b-a == c-b : print('YES')
else: print('NO')

Submission status: Runtime Error

Solution code:
O=input()
E=input()
ol=len(O)
el=len(E)
p=0
if ol>=el:
    for num in range(0,ol):
        p=p+O[num]+E[num]
        print(p)
else :
    for num in range(0, el):
        p = p+O[num] + E[num]
        print(p)

Submission status: Runtime Error

Solution code:
O = raw_input()
E = raw_input()
out = O+E
out =  list(out)
for count in range(0,len(out)/2):
	out[2*count] = O[count]
	out[2*count+1] = E[count]
if len(O) > len(E):
	out[2*count+2] = O[count+1]
out = ''.join(out)
print out

Submission status: Runtime Error

Solution code:
mport numpy as np

n = input()
s = []
for i in range(n):
    s.append(raw_input())
for i in range(n):
    s[i] = list(s[i])
    s[i].sort()
print s
#print s[0][1] in s[1]
#print len(s[0])
#print s[0][1]
#print s[2]
count = 0
answer = []
for j in range(len(s[0])):
    for k in range(1,n):
        if ''.join(s[k]).find(s[0][j]) != -1:
            count += 1
    if count == n-1:
        answer.append(s[0][j])
    print count
    count = 0
print ''.join(answer)

Submission status: Runtime Error

Solution code:
n, m = list(map(int, input().split()))
x = list(map(int, input().split()))
y = list(map(int, input().split()))

sum_x = 0
for i in range(0, n):
    tmp_x = x[i]
    l_x = list(filter(lambda ele: ele > 0, (map(lambda ele: ele - tmp_x, x))))
    sum_x += sum(l_x)

sum_y = 0
for i in range(0, m):
    tmp_y = y[i]
    l_y = list(filter(lambda ele: ele > 0, (map(lambda ele: ele - tmp_y, y))))
    sum_y += sum(l_y)

ans = sum_x * sum_y

divide_num = pow(10, 9) + 7
print(ans % divide_num)

Submission status: Runtime Error

Solution code:
O=input()
E=input()
ol=len(O)
el=len(E)
if ol>=el:
    for num in range(0,ol):
        print(O[num]+E[num])
else :
    for num in range(0, el):
        print(O[num] + E[num])

Submission status: Runtime Error

Solution code:
O=input()
E=input()
ol=len(O)
el=len(E)
list=(ol,el)
L=max(list)
for num in range(0,L):
    print(O[num]+E[num])

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import os
import sys
import math
import numpy as np

n, m = map(int, input().split())
X = input().split()
X = list(map(int, X))
Y = input().split()
Y = list(map(int, Y))


# 1 つの最小長方形は (n-1)*(m-1) 回加算される

S = 0
mod = 10 ** 9 + 7

for x in range(n-1):
	for y in range(m-1):
		var = (X[x+1]-X[x]) * (Y[y+1]-Y[y])
		# print(var)
		x_times = (x+1) * (n-x-1)
		y_times = (y+1) * (m-y-1)

		S += ((var * x_times * y_times) % mod)


print(S%mod)

Submission status: Runtime Error

Solution code:
a = raw_input()
b = raw_input()

print ''.join([x+y for x,y in zip(a,b)]) + ( a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else '' )

Submission status: Runtime Error

Solution code:
l = map(int, input().split())

a=l[0]
b=l[1]
c=l[2]

A=b-a
B=c-b

if A==B:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
l = map(int, input().split())

a=l[0] # A
b=l[1] # B
c=l[2] # C

A=b-a
B=c-b

if A==B:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())
a=l[0] # A
b=l[1] # B
c=l[2] # C

A=b-a
B=c-b

if A==B:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a, b, c = map(int, raw_input().split)
middle = (a + c)/2

if b == middle:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
s=[int(input()) for i in range(3)]
a=0
if i[1]-i[0]==i[2]-i[1]:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a = raw_input()
b = raw_input()

print(''.join([x+y for x,y in zip(a,b)]) + (
  a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else ''
))

Submission status: Runtime Error

Solution code:
a = raw_input()
b = raw_input()

print ''.join(x+y for x,y in zip(a,b)) + (
  a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else ''
)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-                                                

import os
import sys
import math
import numpy as np

O = input()
E = input()
ans = ''
for i in range(len(E)):
    ans += O[i]
    ans += E[i]

if len(O) != len(E):
    ans += O[-1]

print(ans)

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())
a-l[0] # A
b=l[1] # B
c=l[2] # C

A=b-a
B=c-b

if A==B:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a = raw_input()
b = raw_input()

print ''.join(x+y for x,y in zip(a,b))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python

a,b,c=int(raw_input().split())

if c-b==b-a:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
# coding: utf-8
(a,b,c) = int(raw_input().split())
print "YES" if b - a == c - b else "NO"

Submission status: Runtime Error

Solution code:
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])

if b-a is c-b:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#! -*- coding:utf-8 -*-
import math
import sys
a,b,c = map(int,input().split())
x = b - a
y = c - b
if x/y == 1:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())

if a - b == b - c:
  print 'YES'
else:
  print 'NO'