AtCoder Beginner Contest 162 - Lucky 7

Given is a three-digit integer N. Does N contain the digit 7?
If so, print Yes; otherwise, print No.

-----Constraints-----
 - 100 \leq N \leq 999

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
If N contains the digit 7, print Yes; otherwise, print No.

-----Sample Input-----
117

-----Sample Output-----
Yes

117 contains 7 as its last digit.

Source: atcoder | Difficulty: EASY


Solutions:
n = input()
print('Yes' if '7' in n else 'No')


N = int(input())
N_str = str(N)
if '7' in N_str:
	print('Yes')
else:
	print('No')


S = input()
print('Yes' if '7' in S else 'No')


if '7' in list(input()):
	print('Yes')
else:
	print('No')


def main() -> None:
	n = input()
	print('Yes' if '7' in n else 'No')
	return

def __starting_point():
	main()
__starting_point()


n = input()
if n.count('7') > 0:
	print('Yes')
else:
	print('No')


print('No' if input().find('7') == -1 else 'Yes')


print('YNeos'['7' not in input()::2])


N = input()
ans = False
for i in N:
	if i is '7':
		ans = True
		break
	else:
		pass
if ans == True:
	print('Yes')
else:
	print('No')


N = input()
print(['No', 'Yes']['7' in N])


def readinput():
	n = input()
	return n

def main(n):
	if n[0] == '7' or n[1] == '7' or n[2] == '7':
		return 'Yes'
	else:
		return 'No'

def __starting_point():
	n = readinput()
	ans = main(n)
	print(ans)
__starting_point()


x = input()
if '7' in x:
	print('Yes')
else:
	print('No')


s = input()
print('Yes' if '7' in s else 'No')


n = str(input())
print('YNeos'[not '7' in n::2])


N = input()
ans = 0
for i in range(len(N)):
	if N[i] == '7':
		ans = 1
		break
if ans == 1:
	print('Yes')
else:
	print('No')


S = input()
ans = 'No'
for s in S:
	if s == '7':
		ans = 'Yes'
print(ans)


num = input()
print('Yes' if '7' in num else 'No')


N = input()
print('No' if N.count('7') == 0 else 'Yes')


i = input()
print(['No', 'Yes']['7' in i])


print('NYoe s'['7' in input()::2])


print('Yes' if input().find('7') >= 0 else 'No')


N = input()
print('Yes' if str(7) in list(N) else 'No')


import sys
n = input()
print('Yes' if '7' in n else 'No')


N = int(input())
for i in str(N):
	if i == '7':
		print('Yes')
		break
else:
	print('No')


S = input()
print('Yes' if S.count('7') > 0 else 'No')


a = input()
print('Yes' if '7' in a else 'No')


koman = int(input())
num = []
n = koman
while n != 0:
	num.append(n % 10)
	n //= 10
if num[0] == 7 or num[1] == 7 or num[2] == 7:
	print('Yes')
else:
	print('No')


N = input()
if '7' in N:
	print('Yes')
else:
	print('No')


r = input()
print('Yes' if r.count('7') > 0 else 'No')


b = 'YNeos'
a = input()
print(b['7' not in a::2])


n = input()
ans = 'No'
for i in n:
	if i == '7':
		ans = 'Yes'
print(ans)


N = input()
print('Yes' if N.count('7') >= 1 else 'No')


import sys
print('Yes' if '7' in next(sys.stdin) else 'No')


number = input()
print('Yes' if '7' in number else 'No')


S = input()
print('YNeos'[not S.find('7') >= 0::2])


a = list(input())
b = 'Yes' if '7' in a else 'No'
print(b)


N = input()
flag = False
for i in range(len(N)):
	if N[i] == '7':
		flag = True
print('Yes' if flag else 'No')


s = input()
if s[0] == '7' or s[1] == '7' or s[2] == '7':
	print('Yes')
else:
	print('No')


s = list(input())
print(['No', 'Yes']['7' in s])


n = input()
if n[0] == '7' or n[1] == '7' or n[2] == '7':
	ans = 'Yes'
else:
	ans = 'No'
print(ans)


n = input()
f = 0
for i in range(0, len(n)):
	if n[i] == '7':
		print('Yes')
		f = 1
		break
if f == 0:
	print('No')


print(['Yes', 'No'][int('7' not in input())])


N = input()
if N[0] == '7' or N[1] == '7' or N[2] == '7':
	print('Yes')
else:
	print('No')


N = input()
a = int(N[0])
b = int(N[1])
c = int(N[2])
if a == 7 or b == 7 or c == 7:
	print('Yes')
else:
	print('No')


k = input()
print('Yes' if '7' in k else 'No')


s = input()
print('Yes' if s.count('7') >= 1 else 'No')


n = input()
print('Yes' if n.count('7') >= 1 else 'No')


K = input()
if '7' in K:
	print('Yes')
else:
	print('No')


ans = ['No', 'Yes']
print(ans['7' in input()])


N = str(input())
count = 0
for i in N:
	if i == '7':
		count = count + 1
if count >= 1:
	print('Yes')
else:
	print('No')


N = input()
for i in range(3):
	if N[i] == '7':
		print('Yes')
		break
	elif i == 2:
		print('No')


if input().count('7'):
	print('Yes')
else:
	print('No')


print('Yes' if '7' in set([s for s in input()]) else 'No')


print('Yes' if any([i == '7' for i in input()]) else 'No')


n = [i for i in input()]
print('Yes' if '7' in n else 'No')


n = input()
ans = 'No'
for i in range(3):
	if n[i] == '7':
		ans = 'Yes'
print(ans)


n = map(str, input())
print('Yes' if '7' in n else 'No')


n = input()
count = 0
for i in range(3):
	if n[i] == '7':
		count += 1
if count == 0:
	print('No')
else:
	print('Yes')


N = int(input())
X = N % 10
y = N // 10
Y = y % 10
Z = N // 100
if X == 7 or Y == 7 or Z == 7:
	print('Yes')
else:
	print('No')


str = input()
if '7' in str:
	print('Yes')
else:
	print('No')


N = list(input())
print('YNeos'[not '7' in N::2])


n = list(input())
for i in n:
	if i == '7':
		print('Yes')
		return
print('No')


A = input()
a = 'No'
if '7' in A:
	a = 'Yes'
print(a)


n = input()
res = 0
for i in range(len(n)):
	if n[i] == '7':
		res = 1
		break
if res:
	print('Yes')
else:
	print('No')


k = 1
for i in input():
	if i == '7':
		k = 0
print('YNeos'[k::2])


S = list(input())
if '7' in S:
	print('Yes')
	return
else:
	print('No')
	return


def N():
	return int(input())

def L():
	return list(map(int, input().split()))

def NL(n):
	return [list(map(int, input().split())) for i in range(n)]
mod = pow(10, 9) + 7
import sys
import math
import collections
n = N()
if '7' in str(n):
	print('Yes')
else:
	print('No')


i = input()
ans = 'Yes' if '7' in i else 'No'
print(ans)


def __starting_point():
	s = input()
	if '7' in s:
		print('Yes')
	else:
		print('No')
__starting_point()


print({True: 'Yes', False: 'No'}['7' in input()])


n = str(input())
for i in range(len(n)):
	if n[i] == '7':
		print('Yes')
		return
print('No')


n = list(str(input()))
print('Yes' if '7' in n else 'No')


import sys
N = list(str(input()))
for i in range(3):
	if N[i] == '7':
		print('Yes')
		return
print('No')


print('YNeos'[1 - ('7' in input())::2])


N = input()
print('Yes' if N.__contains__('7') else 'No')


import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp
INF = inf
MOD = 1000000007
s = input()
tmp = 0
res = 'No'
for i in s:
	if i == '7':
		res = 'Yes'
print(res)


n = input()
ans = 'No'
if '7' in n:
	ans = 'Yes'
print(ans)


n = int(input())
if str(n).find('7') < 0:
	print('No')
else:
	print('Yes')


s = input()
for i in range(len(s)):
	if '7' == s[i]:
		print('Yes')
		return
print('No')


n = list(input())
if ('7' in n) == True:
	print('Yes')
else:
	print('No')


s = map(str, input())
print('Yes' if '7' in s else 'No')


print('Yes' if '7' in list(str(input().split())) else 'No')


print('Yes' if list(input()).__contains__('7') else 'No')


N = int(input())
if N == 107:
	print('Yes')
elif N == 117:
	print('Yes')
elif N == 127:
	print('Yes')
elif N == 137:
	print('Yes')
elif N == 147:
	print('Yes')
elif N == 157:
	print('Yes')
elif N == 167:
	print('Yes')
elif N == 170:
	print('Yes')
elif N == 171:
	print('Yes')
elif N == 172:
	print('Yes')
elif N == 173:
	print('Yes')
elif N == 174:
	print('Yes')
elif N == 175:
	print('Yes')
elif N == 176:
	print('Yes')
elif N == 177:
	print('Yes')
elif N == 178:
	print('Yes')
elif N == 179:
	print('Yes')
elif N == 187:
	print('Yes')
elif N == 197:
	print('Yes')
elif N == 207:
	print('Yes')
elif N == 217:
	print('Yes')
elif N == 227:
	print('Yes')
elif N == 237:
	print('Yes')
elif N == 247:
	print('Yes')
elif N == 257:
	print('Yes')
elif N == 267:
	print('Yes')
elif N == 270:
	print('Yes')
elif N == 271:
	print('Yes')
elif N == 272:
	print('Yes')
elif N == 273:
	print('Yes')
elif N == 274:
	print('Yes')
elif N == 275:
	print('Yes')
elif N == 276:
	print('Yes')
elif N == 277:
	print('Yes')
elif N == 278:
	print('Yes')
elif N == 279:
	print('Yes')
elif N == 287:
	print('Yes')
elif N == 297:
	print('Yes')
elif N == 307:
	print('Yes')
elif N == 317:
	print('Yes')
elif N == 327:
	print('Yes')
elif N == 337:
	print('Yes')
elif N == 347:
	print('Yes')
elif N == 357:
	print('Yes')
elif N == 367:
	print('Yes')
elif N == 370:
	print('Yes')
elif N == 371:
	print('Yes')
elif N == 372:
	print('Yes')
elif N == 373:
	print('Yes')
elif N == 374:
	print('Yes')
elif N == 375:
	print('Yes')
elif N == 376:
	print('Yes')
elif N == 377:
	print('Yes')
elif N == 378:
	print('Yes')
elif N == 379:
	print('Yes')
elif N == 387:
	print('Yes')
elif N == 397:
	print('Yes')
elif N == 407:
	print('Yes')
elif N == 417:
	print('Yes')
elif N == 427:
	print('Yes')
elif N == 437:
	print('Yes')
elif N == 447:
	print('Yes')
elif N == 457:
	print('Yes')
elif N == 467:
	print('Yes')
elif N == 470:
	print('Yes')
elif N == 471:
	print('Yes')
elif N == 472:
	print('Yes')
elif N == 473:
	print('Yes')
elif N == 474:
	print('Yes')
elif N == 475:
	print('Yes')
elif N == 476:
	print('Yes')
elif N == 477:
	print('Yes')
elif N == 478:
	print('Yes')
elif N == 479:
	print('Yes')
elif N == 487:
	print('Yes')
elif N == 497:
	print('Yes')
elif N == 507:
	print('Yes')
elif N == 517:
	print('Yes')
elif N == 527:
	print('Yes')
elif N == 537:
	print('Yes')
elif N == 547:
	print('Yes')
elif N == 557:
	print('Yes')
elif N == 567:
	print('Yes')
elif N == 570:
	print('Yes')
elif N == 571:
	print('Yes')
elif N == 572:
	print('Yes')
elif N == 573:
	print('Yes')
elif N == 574:
	print('Yes')
elif N == 575:
	print('Yes')
elif N == 576:
	print('Yes')
elif N == 577:
	print('Yes')
elif N == 578:
	print('Yes')
elif N == 579:
	print('Yes')
elif N == 587:
	print('Yes')
elif N == 597:
	print('Yes')
elif N == 607:
	print('Yes')
elif N == 617:
	print('Yes')
elif N == 627:
	print('Yes')
elif N == 637:
	print('Yes')
elif N == 647:
	print('Yes')
elif N == 657:
	print('Yes')
elif N == 667:
	print('Yes')
elif N == 670:
	print('Yes')
elif N == 671:
	print('Yes')
elif N == 672:
	print('Yes')
elif N == 673:
	print('Yes')
elif N == 674:
	print('Yes')
elif N == 675:
	print('Yes')
elif N == 676:
	print('Yes')
elif N == 677:
	print('Yes')
elif N == 678:
	print('Yes')
elif N == 679:
	print('Yes')
elif N == 687:
	print('Yes')
elif N == 697:
	print('Yes')
elif N == 700:
	print('Yes')
elif N == 701:
	print('Yes')
elif N == 702:
	print('Yes')
elif N == 703:
	print('Yes')
elif N == 704:
	print('Yes')
elif N == 705:
	print('Yes')
elif N == 706:
	print('Yes')
elif N == 707:
	print('Yes')
elif N == 708:
	print('Yes')
elif N == 709:
	print('Yes')
elif N == 710:
	print('Yes')
elif N == 711:
	print('Yes')
elif N == 712:
	print('Yes')
elif N == 713:
	print('Yes')
elif N == 714:
	print('Yes')
elif N == 715:
	print('Yes')
elif N == 716:
	print('Yes')
elif N == 717:
	print('Yes')
elif N == 718:
	print('Yes')
elif N == 719:
	print('Yes')
elif N == 720:
	print('Yes')
elif N == 721:
	print('Yes')
elif N == 722:
	print('Yes')
elif N == 723:
	print('Yes')
elif N == 724:
	print('Yes')
elif N == 725:
	print('Yes')
elif N == 726:
	print('Yes')
elif N == 727:
	print('Yes')
elif N == 728:
	print('Yes')
elif N == 729:
	print('Yes')
elif N == 730:
	print('Yes')
elif N == 731:
	print('Yes')
elif N == 732:
	print('Yes')
elif N == 733:
	print('Yes')
elif N == 734:
	print('Yes')
elif N == 735:
	print('Yes')
elif N == 736:
	print('Yes')
elif N == 737:
	print('Yes')
elif N == 738:
	print('Yes')
elif N == 739:
	print('Yes')
elif N == 740:
	print('Yes')
elif N == 741:
	print('Yes')
elif N == 742:
	print('Yes')
elif N == 743:
	print('Yes')
elif N == 744:
	print('Yes')
elif N == 745:
	print('Yes')
elif N == 746:
	print('Yes')
elif N == 747:
	print('Yes')
elif N == 748:
	print('Yes')
elif N == 749:
	print('Yes')
elif N == 750:
	print('Yes')
elif N == 751:
	print('Yes')
elif N == 752:
	print('Yes')
elif N == 753:
	print('Yes')
elif N == 754:
	print('Yes')
elif N == 755:
	print('Yes')
elif N == 756:
	print('Yes')
elif N == 757:
	print('Yes')
elif N == 758:
	print('Yes')
elif N == 759:
	print('Yes')
elif N == 760:
	print('Yes')
elif N == 761:
	print('Yes')
elif N == 762:
	print('Yes')
elif N == 763:
	print('Yes')
elif N == 764:
	print('Yes')
elif N == 765:
	print('Yes')
elif N == 766:
	print('Yes')
elif N == 767:
	print('Yes')
elif N == 768:
	print('Yes')
elif N == 769:
	print('Yes')
elif N == 770:
	print('Yes')
elif N == 771:
	print('Yes')
elif N == 772:
	print('Yes')
elif N == 773:
	print('Yes')
elif N == 774:
	print('Yes')
elif N == 775:
	print('Yes')
elif N == 776:
	print('Yes')
elif N == 777:
	print('Yes')
elif N == 778:
	print('Yes')
elif N == 779:
	print('Yes')
elif N == 780:
	print('Yes')
elif N == 781:
	print('Yes')
elif N == 782:
	print('Yes')
elif N == 783:
	print('Yes')
elif N == 784:
	print('Yes')
elif N == 785:
	print('Yes')
elif N == 786:
	print('Yes')
elif N == 787:
	print('Yes')
elif N == 788:
	print('Yes')
elif N == 789:
	print('Yes')
elif N == 790:
	print('Yes')
elif N == 791:
	print('Yes')
elif N == 792:
	print('Yes')
elif N == 793:
	print('Yes')
elif N == 794:
	print('Yes')
elif N == 795:
	print('Yes')
elif N == 796:
	print('Yes')
elif N == 797:
	print('Yes')
elif N == 798:
	print('Yes')
elif N == 799:
	print('Yes')
elif N == 807:
	print('Yes')
elif N == 817:
	print('Yes')
elif N == 827:
	print('Yes')
elif N == 837:
	print('Yes')
elif N == 847:
	print('Yes')
elif N == 857:
	print('Yes')
elif N == 867:
	print('Yes')
elif N == 870:
	print('Yes')
elif N == 871:
	print('Yes')
elif N == 872:
	print('Yes')
elif N == 873:
	print('Yes')
elif N == 874:
	print('Yes')
elif N == 875:
	print('Yes')
elif N == 876:
	print('Yes')
elif N == 877:
	print('Yes')
elif N == 878:
	print('Yes')
elif N == 879:
	print('Yes')
elif N == 887:
	print('Yes')
elif N == 897:
	print('Yes')
elif N == 907:
	print('Yes')
elif N == 917:
	print('Yes')
elif N == 927:
	print('Yes')
elif N == 937:
	print('Yes')
elif N == 947:
	print('Yes')
elif N == 957:
	print('Yes')
elif N == 967:
	print('Yes')
elif N == 970:
	print('Yes')
elif N == 971:
	print('Yes')
elif N == 972:
	print('Yes')
elif N == 973:
	print('Yes')
elif N == 974:
	print('Yes')
elif N == 975:
	print('Yes')
elif N == 976:
	print('Yes')
elif N == 977:
	print('Yes')
elif N == 978:
	print('Yes')
elif N == 979:
	print('Yes')
elif N == 987:
	print('Yes')
elif N == 997:
	print('Yes')
else:
	print('No')


S = input()
if S[0] == '7' or S[1] == '7' or S[2] == '7':
	print('Yes')
else:
	print('No')


n = input()
flag = 0
for i in range(3):
	if n[i] == '7':
		flag = 1
		break
if flag == 0:
	print('No')
else:
	print('Yes')


print('YNeos'[input().count('7') < 1::2])


print('7' in input() and 'Yes' or 'No')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, bisect
import sys
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
stdin = sys.stdin
ni = lambda : int(ns())
nf = lambda : float(ns())
na = lambda : list(map(int, stdin.readline().split()))
nb = lambda : list(map(float, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()
print('Yes') if '7' in ns() else print('No')


def resolve():
	n = input()
	print('Yes' if '7' in n else 'No')
resolve()


S = str(input())
print(('No', 'Yes')['7' in S])


A = input()
if '7' in A:
	print('Yes')
else:
	print('No')


print('Yes' if '7' in input().strip() else 'No')


N = input()
is_lucky_7 = 0
for i in N:
	if i == '7':
		is_lucky_7 = True
		break
if is_lucky_7:
	print('Yes')
else:
	print('No')


n = input()
f = 'No'
if '7' in n:
	f = 'Yes'
print(f)


l = list(input())
print(['No', 'Yes']['7' in l])