Problem:


Score : 100 points

Problem Statement

You are given a three-digit positive integer N.

Determine whether N is a palindromic number.

Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Constraints

100≤N≤999

N is an integer.

Input

Input is given from Standard Input in the following format:  

N

Output

If N is a palindromic number, print Yes; otherwise, print No.

Sample Input 1

575

Sample Output 1

Yes

N=575 is also 575 when read backward, so it is a palindromic number. You should print Yes.

Sample Input 2

123

Sample Output 2

No

N=123 becomes 321 when read backward, so it is not a palindromic number. You should print No.

Sample Input 3

812

Sample Output 3

No



Sample input:
575


Sample output:
Yes

Submission status: Runtime Error

Solution code:
a=int(input())

print("Yes" if a[0]==a[2] else "No")

Submission status: Runtime Error

Solution code:
n = input()
if n == ins[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a = str(input())
if a[0]=a[-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
print(["No","Yes"][input()[0]==input()[2]])

Submission status: Runtime Error

Solution code:
n=int(input())

h=n//100

t=(n-h*100)//10

o=(n-h*100-t*10)

if h=o:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    s = input()

    for i in range(len(s)/2):
        if s[i] = s[len(s)-1 -i]:
            print('No')
            return
    
    print('Yes')

solve()

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int, input().split())

if B < C or D < A:
    print(0)
elif A < C and B < D:
    print(B-C)
elif A < C and B > D:
    print(D-C)
elif C < A and B < D:
    print(B-A)
elif A < D and B > D:
    print(D-A)

Submission status: Runtime Error

Solution code:
s=(input)
print("YES" if s[0]==s[2] else "No")

Submission status: Runtime Error

Solution code:
print("YES" if input()[0]==input()[2] else "No")

Submission status: Runtime Error

Solution code:
n = int(input())
if n[0] == n[-1]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
if str(n[0]) = str(n[2]):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
if str(n[0]) == str(n[2]):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
if n[0] == n[2]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = list(map(str, input()))
if n[0] = n[2]:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
from collections import *
from heapq import*
import sys
input=lambda:sys.stdin.readline()

d=defaultdict(list)
n=int(input())

for s in range(n-1):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
    d[b].append([a,c])
#defaultdict(<class 'list'>, {1: [[2, 1], [3, 1]], 2: [[1, 1], [3, 3]], 3: [[1, 1], [2, 3]]})

def DIJKSTRA(point,d):
    cost      = {node:float("inf") for node in d.keys()}
    Q         = []  #頂点のリスト
    cost[point]=0  #開始地点のコストをゼロとする（当たり前
    heappush(Q,(point,cost[point]))
    while Q:
        prefnd,tmpC=heappop(Q)
        if cost[prefnd]<tmpC:
            continue
        for node,c in d[prefnd]:
            altC=c+tmpC
            if cost[node]>altC:
                cost[node]=altC
                heappush(Q,(node,altC))
    return cost

q,k=map(int,input().split())
y=DIJKSTRA(k,d)

for i in range(q):
    a,b=map(int,input().split())
    print(y[a]+y[b])

Submission status: Runtime Error

Solution code:
from collections import *
d=defaultdict(list)
n=int(input())

for s in range(n-1):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
    d[b].append([a,c])

#defaultdict(<class 'list'>, {1: [[2, 1], [3, 1]], 2: [[1, 1], [3, 3]], 3: [[1, 1], [2, 3]]})
 
def DIJKSTRA(point,d):
    cost      = {node:float("inf") for node in d.keys()}
    preference= {node:None         for node in d.keys()}#最適路のこと 
    Q         = set(d.keys())  #頂点のリスト
    cost[point]=0  #開始地点のコストをゼロとする（当たり前
    while True:
        prefnd=min(Q, key=lambda c:cost[c]) #最適な点探し
        Q.remove(prefnd)  #最適だった点を削除
        if len(Q)==0:
            break #全部の点消したら終了
        for p,c in d[prefnd]:  #次の点とそこまでのコスト
            temp=cost[prefnd]+c  #スタートからそこまでのコストを計算
            if temp<cost[p]:   #計算してみたコストがそこに行くまでの最小値ならば
                cost[p]=temp #最小値更新
                preference[p]=prefnd
    return preference,cost  #点のつながりとコスト例 1から１に０ １から２に１ １から３に２

q,k=map(int,input().split())
x,y=DIJKSTRA(k,d)

for i in range(q):
    a,b=map(int,input().split())
    print(y[a]+y[b])

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())

print(max(0, min(d,b)-max(c,a)))

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())

print(max(0), min(d,c)-max(c,a))

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())


if b<=c:
    print ('0')
else:
    if b>=d:
        print(str(d-c))
    elif b<d:
        print(str(b-c))
    else:
        print('0')

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())


if b<=c:
    print ('0')
else:
    if b>=d:
        print(str(d-c))
    elif b<d:
        print(str(b-c))

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())


if b<=c:
    print ('0')
    exit()
else:
    if b>=d:
        print(str(d-c))
        exit()
    elif b<d:
        print(str(b-c))
        exit()

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())


if b<=c:
    print ('0')
    exit()
else:
    if b>=d:
        print(d-c)
        exit()
    elif b<d:
        print(b-c)
        exit()

Submission status: Runtime Error

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

if a == c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a=input()
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a=int(input())
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a=int(input().split())
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c = list(int,input().split())
if a==c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(int,input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a = list(int.input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a = map(int.input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a = int(input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
if a[0]==a[2]:
    print(Yes)
else:print(No)

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int, input().split())
print(max(0, min(B, D) - max(A, C)))

Submission status: Runtime Error

Solution code:
num = input().split()
for (r,i) in enumerate(num):
  num[r] = int(i)
start = num[0]
if num[0]<num[2] :
  start = num[2]
finish = num[3]
if num[1]<num[3]:
  finish = num[1]
print(finish-start)

Submission status: Runtime Error

Solution code:
n = input()
ans = 'Yes' if n == [::-1] else 'No'
print(ans)

Submission status: Runtime Error

Solution code:
from collections import deque

def solve1(rs, p, v, cost, costs):
    costs[v] = cost
    for e in rs[v]:
        if p == e[0]:
            continue
        solve1(rs, v, e[0], cost+e[1], costs)
    return costs

n = int(input())
rs = []
for i in range(n - 1):
    abc = input().split(' ')
    rs.append([int(x) for x in abc])
qk = input().split(' ')
q = int(qk[0])
k = int(qk[1])
qs = []
for i in range(q):
    xy = input().split(' ')
    qs.append([int(x) for x in xy])

edges = {}
for r in rs:
    if r[0] not in edges:
        edges[r[0]] = []
    edges[r[0]].append((r[1], r[2]))
    if r[1] not in edges:
        edges[r[1]] = []
    edges[r[1]].append((r[0], r[2]))

c = solve1(edges, -1, k, 0, {})

for query in qs:
    c1 = c[query[0]]
    c2 = c[query[1]]
    print(c1 + c2)

Submission status: Runtime Error

Solution code:
N = input().split
N1 = list(reversed(N))
if N == N1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = input().split
 
if N == list(reversed(N)):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = input().split
 
if N == list(reversed(N)):
    print("Yes")

Submission status: Runtime Error

Solution code:
n_in = int(input()) 
l = [int(input()) for i in range(n_in)] 

p = l[0]
for i in range(1, len(l)):
    q = l[i]

    if p >= q:
        m, n = p, q
    else:
        m, n = q, p

    while True:
        mod_value = m % n
        if mod_value  == 0:
            break

        m = n
        n = mod_value

    p = int(p//n) * q

print(p)

Submission status: Runtime Error

Solution code:
from decimal import Decimal

n_in = int(input()) 
l = [int(input()) for i in range(n_in)] 

p = l[0]
for i in range(1, len(l)):
    q = l[i]

    if p >= q:
        m, n = p, q
    else:
        m, n = q, p

    while True:
        mod_value = m % n
        if mod_value  == 0:
            break

        m = n
        n = mod_value

    p = int(Decimal(p)/n) * q

print(p)

Submission status: Runtime Error

Solution code:
n_in = int(input()) 
l = [int(input()) for i in range(n_in)] 

p = l[0]
for i in range(1, len(l)):
    q = l[i]

    if p >= q:
        m, n = p, q
    else:
        m, n = q, p

    while True:
        mod_value = m % n
        if mod_value  == 0:
            break

        m = n
        n = mod_value

    p = int(q/n) * p

print(p)

Submission status: Runtime Error

Solution code:
n_in = int(input()) 
l = [int(input()) for i in range(n_in)] 

p = l[0]
for i in range(1, len(l)):
    q = l[i]

    if p >= q:
        m, n = p, q
    else:
        m, n = q, p

    while True:
        mod_value = m % n
        if mod_value  == 0:
            break

        m = n
        n = mod_value

    p = int(p*q/n)

print(p)

Submission status: Runtime Error

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

n = list(int(input()))

def digit_list(num):
    num = str(num)
    num = list(num)
    num = list(map(int,num))
    return num

n = digit_list(n)

if n[0] == n[-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
a=N//100
b=N%10
if a==b:
  print('Yes')
else:
  pritn('No')

Submission status: Runtime Error

Solution code:
N = str(input())
if N == N[::-1]
	print('Yes')
else
	print('No')

Submission status: Runtime Error

Solution code:
a,b,c,d=(int(x) for x in input().split())

if b<=c or d<=a:
    print(0)
else:
    print(min(b,d)-max(a,c))

Submission status: Runtime Error

Solution code:
n=str(input())

if n[0]=n[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
print('Yes') if str(input())==str(input())[::-1] else print('No')

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int, input().split())
if A<=C:
    if B<=C:
        print("0")
    elif D<=B:
        print("{}".format(D-C))
    else:
        print("{}".format(B-C))
else:
    if D<=A:
        print("0")
    elif B<=D:
        print("{}".format(B-A))
    else:
        print("{}".format(D-A))

Submission status: Runtime Error

Solution code:
N = [i for i in input()]
check = True
for i in range(N):
    if N[i] != N[-i]:
       check = False
       break
if check ==True:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a=input()
for i in range(len(a)):
  if not a[i]==a[len(a)-1-i]:
    ans=1
if ans==1:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
a = input()
if a[0]==a[3]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = int(input())
if a[0]==a[3]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n=input()
print("Yes" if n=n[::-1] else "No")

Submission status: Runtime Error

Solution code:
N=input()
if N(0)==N(2):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n=inupt()
if n==n[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import collections as c
 
d=c.defaultdict(list)
n=int(input())
for s in range(n-1):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
    d[b].append([a,c])
 
def DFS(point,d,cost,TFlist): #入力と同じindex系
    for s in d[point]:
        try:
            p=s[0]
            c=s[1]+cost[point]
            if TFlist[p-1]:
                continue
            cost[p]+=c
            TFlist[p-1]=1
            DFS(p,d,cost,TFlist)
        except:
            continue
 
cost=[None]+[0 for i in range(n)]
q,k=map(int,input().split())
TFlist=[0 for i in range(n)]
TFlist[k-1]=1
DFS(k,d,cost,TFlist)
 
for t in range(q):
    a,b=map(int,input().split())
    print(cost[a]+cost[b])

Submission status: Runtime Error

Solution code:
A,B,C,D=map(int,input().split())
ans=B-C
if ans<=0:
    print(0)
else:
    print(ans-A)

Submission status: Runtime Error

Solution code:
n = int(input())
print("Yes") if n[0] == n[2] else print("No")

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())

if b <= c or d <= a:
    print(0)
elif a <= c:
    if b <= d:
        print(b-c)
    else:
        print(d-c)
else:
    if b <= d:
        print(b-a)
    else:
        print(c-b)

Submission status: Runtime Error

Solution code:
n = input()
if n = n[::-1]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a=int(input());print('Yes' if a[0]==a[2] else 'No')

Submission status: Runtime Error

Solution code:
n=input()
for i in range(len(n)//2)
    if n[i]!=n[-1-i]:
        print("No")
        exit()
print("Yes")

Submission status: Runtime Error

Solution code:
n=int(input())
t=list(map(int,[input() for i in range(n)]))

def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)
def lcm(x,y):
    return x*y//gcd(x,y)

if n==1:
    print(t[0])
else:
    ans=lcm(t[0],t[1])
    for i in range(n-1):
        ans=lcm(ans,lcm(t[i],t[i+1]))
    print(ans)

Submission status: Runtime Error

Solution code:
n = list(input().split())
if n[0]==n[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
T = [int(input()) for i in range(N)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


if N == 1:
    print(T[0])
    exit()

now = lcm(T[0], T[1])
for i in range(1, N):
    now = lcm(now, T[i])

print(now)

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
if a > c:
    a,b,c,d = c,d,a,b
if b < c:print(0)
elif b >= c and b < d:print(b-c)
else : print(d-c)

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int,input().split())
x = max(A, C)
y = min(B, D)
if(y-x > 0):
  print(y - x)
else:
  print(0)

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int,input().split())
x = max(A, B)
y = min(C, D)
if(y-x > 0):
  print(y - x)
else:
  print(0)

Submission status: Runtime Error

Solution code:
print(["No","Yes"][input()==input()[::-1]])

Submission status: Runtime Error

Solution code:
N=int(input())
if N==N[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

def make_Graph(N, edges):#頂点の名前はi - 1で受け付ける
    graph = [ [] for i in range(N)]
    for edge in edges:
        a, b, c = edge
        graph[a].append((b,c))
        graph[b].append((a,c))
    return graph

def BFS(N, graph, start):
    Q = []
    V = []
    prev = [None] * N
    dd = [float("inf")] * N
    Q.append(start)
    dd[start] = 0
    while len(V) < N:
        a = Q.pop(0)
        V.append(a)
        for b, c in graph[a]:
            if b != prev[a]:
                Q.append(b)
                prev[b] = a
                dd[b] = dd[a] + c
    return dd

def DFS(N, graph, a, p, d):
    dd[a] = d
    for b, c in graph[a]:
        if b == p or dd[b] != 0:
            continue
        else:
            DFS(N, graph, b, a, d + c)

N = int(input())

sys.setrecursionlimit(100)

graph = [ [] for i in range(N)]
for i in range(N-1):
    a, b, c = (int(j) for j in input().split())
    graph[a-1].append((b-1,c))
    graph[b-1].append((a-1,c))

Q, K =(int(i) for i in input().split())
dd = [0] * N

try:
    DFS(N, graph, K-1, -1, 0)
except:
    dd = BFS(N, graph, K-1)

for i in range(Q):
    x, y = (int(a) for a in input().split())
    print(dd[x-1] + dd[y-1])

Submission status: Runtime Error

Solution code:
def make_Graph(N, edges):#頂点の名前はi - 1で受け付ける
    graph = [ [] for i in range(N)]
    for edge in edges:
        a, b, c = edge
        graph[a].append((b,c))
        graph[b].append((a,c))
    return graph

def BFS(N, graph, start):
    Q = []
    V = []
    d = [float("inf")] * N
    Q.append(start)
    d[start] = 0
    while len(V) < N:
        a = Q.pop(0)
        V.append(a)
        for b, c in graph[a]:
            if not b in V:
                Q.append(b)
                d[b] = d[a] + c
    return d

N = int(input())
edges = []
for i in range(N-1):
    a, b, c = (int(j) for j in input().split())
    edges.append((a-1, b-1, c))

graph = make_Graph(N, edges)

Q, K =(int(i) for i in input().split())

d = BFS(N, graph, K-1)
for i in range(Q):
    x, y = (int(a) for a in input().split())
    print(d[x-1] + d[y-1])

Submission status: Runtime Error

Solution code:
import itertools
import math


def gcd(a,b):
    while b:
        a, b = b, a % b
    return a


def lcm(left, right):
    return (int(left) * int(right)) / int(gcd(left, right))


N = int(input().strip())
Ts = []
for i in range(N):
    Ts.append(int(input().strip()))

res = int(lcm(Ts[0], Ts[1]))
for T in Ts[2:]:
    res = int(lcm(res, T))

print(int(res))

Submission status: Runtime Error

Solution code:
n = input()
if n[2]n[1]n[0] == n:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = input()
if n[2][1][0] == n:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N  = list(input())
if N[0] == N[2]:
	print('Yes')
else:
	pritn('No')

Submission status: Runtime Error

Solution code:
N = int(input())
M = N[2] + N[1] + N[0]
if N == M:
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
N = input()
M = N[2] + N[1] + N[0]
if N == M:

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a <= i < b and c <= i < d:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a < i < b and c < i < d:
    ans += 1
print(ans+1)

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a < i < b and c < i < d
  ans += 1
print(ans+1)

Submission status: Runtime Error

Solution code:
n=input()
m=n[::-1]
if n=m:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n=input()
print(reverse[::-1])

Submission status: Runtime Error

Solution code:
n=input()
print(reverse(n))

Submission status: Runtime Error

Solution code:
print("YNeos"[if not int(input())%101 in range(0,100,10)::2])

Submission status: Runtime Error

Solution code:

a=""
a=raw_input()
if a[0]==a[2]:
    print "Yes"
else:
    print "No"

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())

if (b<c)|(a>d):
  t=0
elif (a<=c)and(b>=d):
  t=d-c
elif (a>c)and(b<d):
  t=b-a
else:
  t=abs(b-c)
print(t)

Submission status: Runtime Error

Solution code:
a=raw_input()
if a%10 == a/100:
    print "Yes"
else
    print "No"

Submission status: Runtime Error

Solution code:
n = int(input())
t = [int(input()) for i in range(n)]

def gcd(a, b):
  if a<b:
    a, b = b, a
  if b==0:
    return a
  return gcd(b, a%b)

def lcm(a, b):
  g = gcd(a, b)
  return a*b//g

ans = 1
for i in range(n):
  ans = lcm(ans, t[i])
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())

if N//100=N%10:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import math
import functools
N = int(input())
T = []
for i in range(N):
  T.append(int(input()))
def gcd(A, B):
  while(True):
    if A and B:
      if A > B:
        A = A % B
      else:
        B = B % A
    else:
      return max(A, B)
 
def lcm(A, B):
  return int(A * (B // gcd(A, B)))
 
print(functools.reduce(lcm, sorted(T, reverse=True)))

Submission status: Runtime Error

Solution code:
 print(["Yes","No"][(lambda x:bool(x/100-x%10))(input())])

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	cin>>a;
	if(a/100==a%10&&a/100==a/10%10)
		cout<<"YES";
	else
		cout<<"NO";
	return 0;
}

Submission status: Runtime Error

Solution code:
import fractions
t=1
for i in range(int(input())):
    s = int(input())
    t = t*s//fractions.gcd(s,t)
print(t)

Submission status: Runtime Error

Solution code:
n = int(input().split())
if n[0]==n[2]: print('Yes')
else: print('No')

Submission status: Runtime Error

Solution code:
a=int(input())
if a/100==a%100/10 and a/100=a%10:
  print "Yes"
else:
  print "No"

Submission status: Runtime Error

Solution code:
a=input()
if a/100==a%100/10 and a/100=a%10:
  print "Yes"
else:
  print "No"

Submission status: Runtime Error

Solution code:
a=input()
if a[0]==a[2]:
    print "Yes"
else:
    print "No"

Submission status: Runtime Error

Solution code:
A,B, C, D = map(int,input().split())
if A <= C and min(D, B)-C >= 0:
    print(min(D, B)-C)
elif A > C and min(D, B)-A >= 0:
    print(min(D, B)-A)
else:
    print(0)

Submission status: Runtime Error

Solution code:
A,B,C,D = list(map(int,input.split(" ")))

if B<C:
    res = 0
else:
    res = min(B,D) - max(A<C)
print(res)

Submission status: Runtime Error

Solution code:
N = input()
print (["No","Yes"][N[0] == N[2])

Submission status: Runtime Error

Solution code:
N = int(input())
print (["No","Yes"][N[0] == N[2])

Submission status: Runtime Error

Solution code:
N = int(input())
print (["Yes", "No"][N[0]!=N[1])

Submission status: Runtime Error

Solution code:
# ABC 070 B

A, B, C, D = map(int, input().split())

def left(a, c):
    if a < c:
        return c
    return a

def right(b, d):
    if b < d:
        return b
    return d

print(right(B, D) - left(A, C))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<queue>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for(int i=m;i<(int)(n);i++)
typedef pair<int,int> pint;
typedef long long ll;
typedef pair<ll,ll> pll;
const int inf   = 510101010;
const ll longinf=1LL<<60;


int main(){
  string s;
  cin>>s;
  if(s[0]==s[2])cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
  }

Submission status: Runtime Error

Solution code:
n=input()
if n[0]==n[2[]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())
 
before = 0
after = 0
 
if a >= c:
  before = a - c
else:
  before = c - a
 
if b >= d:
  after = d
else:
  after = b
print(after - before)

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
print(-a+b-c+d+2)

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
print(min(b,d)-max(a,c))

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
if b<c:
    print(0)
else:
    print(min(b,d)-max(a,c))

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
s=max(b,d)-min(a,c)
s_i=(c-a)+(d-b)
if b<c:
    print(0)
else:
    print(s-s_i)

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
s=max(b,d)-min(a,c)
s_i=(c-a)+(d-b)
if b<c:
    print(0)
else:
    print(abs(s_i-s))

Submission status: Runtime Error

Solution code:
n=list(map(int,input().split))
n_re=n.reverse()
if n==n_re:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a,b):
    return a*b // gcd(a,b)

n = int(input())
t_list = []
for x in range(n):
    t_list.append(int(input()))
result = 1
for t in t_list:
    result = lcm(result,t)
print(result)

Submission status: Runtime Error

Solution code:
def solve():
    A, B, C, D = list(map(int, input().split()))
    ans = min(B,D) - max(A,C)
    if ans < 0:
        ans = 0
    print(ans)
    
solve()

Submission status: Runtime Error

Solution code:
n = input()
a1 = n%10
a2 = (n-a1)%100
a3 = (n-a1-a2)/100
if a1==a3:
    print("Hello World")

Submission status: Runtime Error

Solution code:
n = input()
a1 = n%10
a2 = (n-a1)%100
a3 = (n-a1-a2)/100
if a1==a2:
    print("Hello World")

Submission status: Runtime Error

Solution code:
a = input()
A = a[0]
B = a[2]
if A == B:
 print(Yes)
else:
 print(No)

Submission status: Runtime Error

Solution code:
a = input()
b = int(a[0])
c = int(a[2])
if b = c:
 print("Yes")
else:
 print("No")

Submission status: Runtime Error

Solution code:
a = input()
b = int(a[0])
c = int(a[2])
if b = c:
print("Yes")
else:
print("No")

Submission status: Runtime Error

Solution code:
a = input()
b = a[0]
c = a[2]
if b = c:
print("Yes")
else:
print("No")

Submission status: Runtime Error

Solution code:
a = (input())
b = a[0]
c = a[2]
if b = c:
print("Yes")
else:
print("No")

Submission status: Runtime Error

Solution code:
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
if A == C:
 print("Yes")
else:
 print("No")

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())


one = [i for i in range(a, b)]
two = [i for i in range(c, d)]

count = 0
for i in one:
    if i in two:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
import sys
#sys.stdin = open('Transit_Tree_Path.txt', 'r')

def dfs(g, start):
    dist = [-1 for i in xrange(len(g))]
    dist[start] = 0

    q = [start]
    while len(q) > 0:
        u = q.pop()
        for v, l in g[u].iteritems():
            if dist[v] == -1 or dist[u] + l < dist[v]:
                dist[v] = dist[u] + l
                if not v in q:
                    q.append(v)
                    
    return dist

n = int(raw_input())
g = [{} for i in xrange(n+1)]

for i in xrange(n-1):
    u, v, l = map(int, raw_input().split())
    g[u][v] = l
    g[v][u] = l


q, k = map(int, raw_input().split())
dist = dfs(g, k)
for i in xrange(q):
    x, y = map(int, raw_input().split())
    print dist[x] + dist[y]

Submission status: Runtime Error

Solution code:
import sys
#sys.stdin = open('Transit_Tree_Path.txt', 'r')

def spfa(g, start):
    dist = [1e15 for i in xrange(len(g))]
    dist[start] = 0

    q = [start]
    while len(q) > 0:
        u = q.pop(0)
        for v, l in g[u].iteritems():
            if dist[u] + l < dist[v]:
                dist[v] = dist[u] + l
                if not v in q:
                    q.append(v)
                    
    return dist

n = int(raw_input())
g = [{} for i in xrange(n+1)]

for i in xrange(n-1):
    u, v, l = map(int, raw_input().split())
    g[u][v] = l
    g[v][u] = l


q, k = map(int, raw_input().split())
dist = spfa(g, k)
for i in xrange(q):
    x, y = map(int, raw_input().split())
    print dist[x] + dist[y]

Submission status: Runtime Error

Solution code:
s = input().split()
A = int(s[0])
B = int(s[1])
C = int(s[2])
D = int(s[3])

a_c = max(A, C)
b_d = min(B, D)

if a_c - b_d:
  print(a_c - b_d)
else:
  print("0")

Submission status: Runtime Error

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

A, B, C, D = [i for i in s]

greater = max(A, C)
less = min(B, D)

if min(0, greater - less):
　print(min(0, greater- less)
else:
   print("0")

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Here your code !
N = int(input())
A = int(input())

print(N*N-A)

Submission status: Runtime Error

Solution code:
import sys;sys.setrecursionlimit(int(1e7))
from sys import stdin
from collections import deque
 
input = stdin.readline
N = int(input())
tree = [[] for _ in range(N+1)]
for _ in range(N-1):
    a, b, c = map(int,input().split())
    tree[a].append((b,c))
    tree[b].append((a,c))
 
Qn,K = map(int,input().split())
XY = [tuple(map(int,input().split())) for _ in range(Qn)]
 
depth = [None]*(N+1)
def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e[0] != p:
            DFS(e[0], v, d + e[1])
DFS(K,0,0)
 
for i in range(Qn):
    print(depth[XY[i][0]] + depth[XY[i][1]])

Submission status: Runtime Error

Solution code:
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
    
def lcm(a, b):
	return a * b // gcd (a, b)

result = lcm(T[0],T[1])

for x in range(2,N):
    result = lcm(result, T[x])

print(result)

Submission status: Runtime Error

Solution code:
def gcd(a,b):
    #a=min(a,b)
    #b=max(a,b)
    while b:
        a,b= b, a%b
    return a

def lcm(a,b):
    return a*b//gcd(a,b)
T=[]
N=int(input())
for i in range(N):
    T.append(int(input()))

ans=1
for t in T:
    ans=lcm(ans, t)

print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
alice=[x for x in range(a,b+1)]
bob=[x for x in range(c,d+1)]
kaburi=list(set(alice) & set(bob))
if len(kaburi)<=1:
    print(0)
else:
    ans=kaburi[-1]-kaburi[0]
    print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
if a==c:
    print(abs(b-d))
elif a>c:
    if a>d:
        print(0)
    elif a<d<b:
        print(abs(a-d))
    else:
        print(abs(a-b))
else:
    if c>b:
        print(0)
    elif c<b<d:
        print(abs(c-b))
    else:
        print(abs(c-d))

Submission status: Runtime Error

Solution code:
x = input()↲
if x[0] == x[2]:↲
    print('Yes')↲
else:↲
    print('No')↲

Submission status: Runtime Error

Solution code:
from fractions import gcd

N = int(input())
T = []
for i in range(N):
  T.append(int(input()))

res = 1
for t in T:
  res = int(res/(gcd(res, t))) * t
print(res)

Submission status: Runtime Error

Solution code:
tmp=map(int, raw_input().split(" "))
if tmp[1]<tmp[2]:
    print 0
else:
    print min(tmp[1],tmp[3])-tmp[2]

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()))
ans=min(l[1],l[3])-max(l[0],l[2])
print(ans if ans>0 else 0)

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int,input().split())

if (B < C or D < A):
    print("0")
else:
    print(abs(max(A,C)-min(B,D)))

Submission status: Runtime Error

Solution code:
N = input( )

N_100 = N // 100
N = N - 100 * N_100
N_10 = N // 10
N = N - 10 * N_10
N_1 = N

if  N_100 == N_1:
    print ('Yes')
else :
    print ('No')