Problem:


Score : 100 points

Problem Statement

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 1

117

Sample Output 1

Yes

117 contains 7 as its last digit.

Sample Input 2

123

Sample Output 2

No

123 does not contain the digit 7.

Sample Input 3

777

Sample Output 3

Yes



Sample input:
117


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
K = int(input())
 
 
ans = 0
for i in range(K):
    for j in range(K):
        for k in range(K):
           
 
                ans += gcd(i+1,j+1,k+1)
            #1-Kまで
print(ans)

Submission status: Wrong Answer

Solution code:
import math

K = int(input())
n = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            n += math.gcd(math.gcd(i,j),k)
print(n)

Submission status: Wrong Answer

Solution code:
N = input().split('7')
print(N)
if len(N)>1:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
#pow(a,b,mod)
from math import gcd
from functools import reduce
from itertools import product ##for i in z for j in z -> for i,j, in product(z,z)
k=int(input())
z=range(1,k+1)
print(sum(gcd(i,gcd(j,k)) for i,j,k in product(z,z,z)))

Submission status: Wrong Answer

Solution code:
n=input()
f=0
for i in n:
  if i=='7':
    print("Yes")
    f=1
    break
if f==0:
  print("NO")

Submission status: Wrong Answer

Solution code:
from math import *

N= int(input())

a = floor(N/100)
b=floor((N-a)/10)
c=N%10

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

Submission status: Wrong Answer

Solution code:
a=int(input())
while a>0:
    if(a%10==7):
        print('Yes')
        print(a)
        break
    else:a=a//10
if a==0:print('No')
print(a)

Submission status: Wrong Answer

Solution code:
a = input('num:')
if len(a) == 3:
  for x in a:
    if int(x) == 7:
      print("yes")
      break
    else:
      print("no")

Submission status: Wrong Answer

Solution code:
n=int(input())
# a,b,c=map(int,input().split())
cnt=0
def gcd(a,b):
    if a==0: return b
    else: return gcd(b%a,a)
# print(gcd(a,b))

def gcd_3(a,b,c):
    if gcd(a,b)==0: return c
    else: return gcd(c % gcd(a,b),gcd(a,b))

for i in range(1,n+1):
    for j in range ( 1 , n + 1 ):
        for k in range ( 1 , n + 1 ):
            # print(i,j,k)
            cnt+=gcd_3(i,j,k)
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
while a>0:
    if(a%10==7):
        print('Yes')
        break
    else:a=a/10
if a==0:print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
if  N % 10 == 7:
  print("Yes") 
elif  N % 100 == (70 or 71 or 72 or 73 or 74 or 75 or 76 or 77 or 78 or 79):
  print("Yes")
elif  (N - (N % 100)) == 700:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
from math import gcd
K=int(input())+1
sum=0
for a in range(1,K):
    for b in range(1,K):
        for c in range(1,K):
            AB = gcd(a,b)
            BC = gcd(b,c)
            ABC = gcd(AB,BC)
            sum = sum+ABC
print(sum)

Submission status: Wrong Answer

Solution code:
n = input().split()
print('Yes' if '7' in n else 'No')

Submission status: Wrong Answer

Solution code:
K = int(input())

from math import gcd


sum = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            sum += gcd(gcd(b,c), a)

print(sum)

Submission status: Wrong Answer

Solution code:
from math import gcd
K=int(input())+1
sum=0
for a in range(1,K):
    for b in range(1,K):
        for c in range(1,K):
            AB = int(gcd(a,b))
            BC = int(gcd(b,c))
            ABC = int(gcd(AB,BC))
            sum = sum+ABC
print(sum)

Submission status: Wrong Answer

Solution code:
K = int(input())
S = 0

def gcd(a,b):
   while b != 0:
       a, b = b, a % b
       if b ==0:
           return a
A1 = [0,0]
A2 = [0,0,0]
for i in range(1, K+1):
    S = S + i

if K > 1:
    for j in range(1, K):
        A1[0] =  j
        for k in range(j+1,K+1):
            A1[1] = k
            S += 6 * gcd(A1[1],A1[0])

if K > 2:
    for i1 in range(1, K-1):
        A2[0] = i1
        for k1 in range(i1+1, K):
            A2[1] = k1
            for j1 in range(k1+1,K+1):
                A2[2] = j1
                G3 = gcd(A2[2],A2[1])
                if G3 >= A2[0]:
                    S += 6 * gcd(G3,A2[0])
                else:
                    S += 6 * gcd(A2[0],G3)
print(S)

Submission status: Wrong Answer

Solution code:
K = int(input())

from math import gcd


sum = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            sum += gcd(gcd(a, b), c)

print(sum)

Submission status: Wrong Answer

Solution code:
import math
#数字の各桁の抽出,桁抽出
N = int(input())

#Nを下の桁から取る
while N!=0:
    ketasu = int(math.log10(N)//1 + 1)
    top_keta = N // 10**(ketasu-1)
    print(top_keta)
    if top_keta == 7:
        print("Yes")
        break
    N = N - top_keta*10**(ketasu-1)
else:
    print("No")

Submission status: Wrong Answer

Solution code:
input_num = input("Enter a number between 100 and 999: " )
N = int(input_num)
 
if  N > 999 or N < 100:
    print("error")
 
elif str(N)[-1] == '7':
  print("Yes")
elif str(N)[-2] == '7':
  print("Yes")
elif str(N)[-3] == '7':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
from math import gcd
n = int(input())
sum = 0
for i in range(1, n+1):
    for j in range(1, n+1):
        for k in range(1, n+1):
            sum += gcd(gcd(i, j), k)
print(sum)

Submission status: Wrong Answer

Solution code:
from math import gcd
K = int(input())
ans = 0
for i in range(1,K + 1):
    for j in range(1,K + 1):
        for k in range(1,K + 1):
            ans += gcd(gcd(i,j),k)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
# k = int(input())
k = 2


def gcd(*numbers):
    return reduce(math.gcd, numbers)

ans = 0
for i in range(1,k+1):
  for j in range(i,k+1):
    for m in range(j,k+1):
      tem=[]
      tem = [i,j,m]
      
      if  len(set(tem)) == 1 :
        ans += i
      elif len(set(tem)) == 2:
        ans += gcd(i,j,m) * 3
      elif len(set(tem)) == 3:
        ans += gcd(i,j,m) * 6

print(ans)

Submission status: Wrong Answer

Solution code:
import math
K=int(input())
ans=0

for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            ans+=math.gcd(i,math.gcd(j,k))
print(ans)

Submission status: Wrong Answer

Solution code:
import math

K = int(input())
sumGCD = K * K * K
for a in range(2, K + 1, 1):
    for b in range(2, K + 1, 1):
        for c in range(2, K + 1, 1):
            arr = [a, b, c]
            gcdNum = math.gcd(math.gcd(a, b), c)
            # if gcdNum != 1:
            # print(arr)
            # print(gcdNum)
            sumGCD += gcdNum - 1
print(sumGCD)

Submission status: Wrong Answer

Solution code:
import math
K=int(input())
sum=0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            sum+=math.gcd(math.gcd(i, j), k)
print(sum)

Submission status: Wrong Answer

Solution code:
print("YNeos"["7" in input()::2])

Submission status: Wrong Answer

Solution code:
from math import gcd
k = int(input())
ans = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for l in range(1, k+1):
            ans += gcd(gcd(i, j), l)
print(ans)

Submission status: Wrong Answer

Solution code:
N = list(input(""))

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

Submission status: Wrong Answer

Solution code:
import math
a = math.gcd(1, 100)
print("Yes")

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)

K=int(input())
ans=0
for a in range(1,K+1):
    for b in range(1, K + 1):
        for c in range(1,K+1):
            ans+=gcd(a,b,c)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input("N = "))
if 100 <= N <= 999:
        if "7" in str(N):
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

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

import re

x = str(input())

if len(x) == 3:
    if re.match("7", x):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N= input()

if(N[0] == str(7)):
    print("Yes")
elif(N[1] == str(7)):
    print("Yes")
elif(N[2] == str(7)):
    print("Yes")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
num=int(input())
if num%15==0:
  num=(num-num%15)/15
  print(int(num*(num+1)*15/2))
elif num%15==2:
  num=(num-2)/15
  print(int(num*(num+1)*15/2)+num*30+3)
elif num%15==4:
  num=(num-4)/15
  print(int(num*(num+1)*15/2)+num*120+7)
elif num%15==1:
  num=(num-1)/15
  print(int(num*(num+1)*15/2)+num*15+1)
elif num%15==7:
  num=(num-7)/15
  print(int(num*(num+1)*15/2)+num*210+14)
elif num%15==8:
  num=(num-8)/15
  print(int(num*(num+1)*15/2)+num*240+22)
elif num%15==11:
  num=(num-11)/15
  print(int(num*(num+1)*15/2)+num*330+33)
elif num%15==13:
  num=(num-13)/15
  print(int(num*(num+1)*15/2)+num*390+46)
elif num%15==14:
  num=(num-14)/15
  print(int(num*(num+1)*15/2)+num*420+60)

Submission status: Wrong Answer

Solution code:
N = input()
if ( '5' in N ):
	print("Yes")
else:
  	print("No")

Submission status: Wrong Answer

Solution code:
def lucky_7():

  input_num = input("Enter a number between 100 and 999: " )
  N = int(input_num)

  if  N > 999 or N < 100:
    print("No")

  elif str(N)[-1] == '7':
    print("Yes")
  elif str(N)[-2] == '7':
    print("Yes")
  elif str(N)[-3] == '7':
    print('Yes')
  else:
    print('No')

lucky_7()

Submission status: Wrong Answer

Solution code:
N = int(input())
if  N % 10 == 7:
  print("Yes") 
elif  (N - (N % 100)) == 700:
  print("Yes")
elif  N % 100 == (70 or 71 or 72 or 73 or 74 or 75 or 76 or 77 or 78 or 79):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input()) + 1


def find_gcd(x, y):
    while y:
        x, y = y, x % y

    return x


ans = 0
for a in range(1, N):
    for b in range(1, N):
        gcd = a if a == b else find_gcd(a, b)

        for c in range(1, N):
            ans += c if gcd == c or a == b == c else find_gcd(gcd, c)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = 0
for i in range(0,N):
  if (i+1) % 3 != 0 and (i+1) % 5 != 0:
    S = S + i+1
print(S)

Submission status: Wrong Answer

Solution code:
t= input(" ")
for i in range (len(t)):
  if(int(t[i])==7):
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np
N=input()
if (N[0]=="7"):
    print("yes")
elif (N[1]=="7"):
    print("yes")
elif (N[2]=="7"):
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

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

import re

x = str(input())

if re.match("7", x):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def lucky_7():

  input_num = input("Enter a number between 100 and 999: " )
  N = int(input_num)

  if  N > 999 or N < 100:
    print("error")

  elif str(N)[-1] == '7':
    print("Yes")
  elif str(N)[-2] == '7':
    print("Yes")
  elif str(N)[-3] == '7':
    print('Yes')
  else:
    print('No')

lucky_7()

Submission status: Wrong Answer

Solution code:
given = int(input())
sums  = 0
for i in range(1, given + 1):
  if i % 3 == 0 or i % 5 == 0:continue
  sums += i
print(sums)

Submission status: Wrong Answer

Solution code:
N = input()
for i in N:
    if '7' in str(N):
        print("yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = input()
if '7' in str(N):
    print("yes")
print("No")

Submission status: Wrong Answer

Solution code:
s = input() 
l = [int(x) for x in s]

if l[0] == 7 or l[1] == 7 or l[2] == 7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N = input()
if '7' in str(N):
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = input().split()

if "7" in n:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
print('hello')

Submission status: Wrong Answer

Solution code:
inputStr = input()

out = 'NO'
for c in inputStr:
    if c == '7':
        out = 'YES'

print(out)

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = 0
for i in range(3):
  t = n%10
  if t == 7:
    print("YES")
    flag = 1
    break
  n = int(n/10)
if flag == 0:
  print("NO")

Submission status: Wrong Answer

Solution code:
inputStr = input()

out = "NO"
for c in inputStr:
    if c == '7':
        out = "YES"

print(out)

Submission status: Wrong Answer

Solution code:
n = input()
if n[0] == 7 or n[1]==7 or n[2]==7 in str(n):
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = 0
for i in range(3):
  t = n%10
  if t == 7:
    print("YES")
    flag = 1
    break
  n = n/10
if flag == 0:
  print("NO")

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
 
def gcd(nums):
    return reduce(math.gcd, nums)
 
K = int(input())
 
ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            ans += gcd([i, j, k])
 
print(ans)

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
I = I + 1
a = 0
for num in range(I):
    if num%3 == 0 and num%5 == 0:
        print('FizzBuzz')
    elif num%3 == 0:
        print('Fizz')
    elif num%5 == 0:
        print('Buzz')
    else:
        a = a + num

print(a)

Submission status: Wrong Answer

Solution code:
num = [int(x) for x in input().split()]

for n in num:
    if n == 7:
        print("Yes")
        break
    elif n != 7:
        print("No")

Submission status: Wrong Answer

Solution code:
input_num = input("Enter a number between 100 and 999: " )
N = int(input_num)

if  N > 999 or N < 100:
    print("error")

elif str(N)[-1] == '7':
  print("Yes")
elif str(N)[-2] == '7':
  print("Yes")
elif str(N)[-3] == '7':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = input()
N = str(n)
if "7" in N:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
l = [int(x) for x in input()]

if l[0] == 7 or l[1] == 7 or l[2] == 7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
if  N % 10 == 7:
  print("Yes") 
elif  N % 100 == (70 or 71 or 72 or 73 or 74 or 75 or 76 or 77 or 78 or 79):
  print("Yes")
elif  N - (N % 100) == 700:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n% 10 == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#標準入力
#s = [int(x) for x in input().split()]

s = input() 
l = [int(x) for x in s]

if l[0] == 7 or l[1] == 7 or l[2] == 7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
inputStr = int(input())

for c in str(inputStr):
    if c == '7':
        print("YES")
        exit()

print("NO")

Submission status: Wrong Answer

Solution code:
input_num = input("Enter a number between 100 and 999: " )
input_int = int(input_num)

if  input_int > 999 or input_int < 100:
    print("error")

elif str(input_int)[-1] == '7':
  print("Yes")
elif str(input_int)[-2] == '7':
  print("Yes")
elif str(input_int)[-3] == '7':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input() 
l = [int(x) for x in s]

if l[0] == 7 or l[1] == 7 or l[2] == 7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N = input()
if '7' in str(N):
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
inputStr = input()

for c in inputStr:
    if c == '7':
        print("YES")
        exit()

print("NO")

Submission status: Wrong Answer

Solution code:
num = input()
if '7' in str(num):
  print('yes')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
N = int(input())
count_list = []
for i in range(N + 1):
    if i % 15 == 0:
        count_list.append('FizzBuzz')
    elif i % 3 == 0:
        count_list.append('Fizz')
    elif i % 5 == 0:
        count_list.append('Buzz')
    else:
        count_list.append(i)
int_list = []
for i in count_list:
    try:
        int_list.append(int(i))
    except:
        pass
print(sum(int_list))

Submission status: Wrong Answer

Solution code:
import math
import itertools
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


K = int(input())

sums = 0
# for a, b, c in itertools.permutations(range(1, K+1), 3):
for a, b, c in itertools.product(range(1, K+1), repeat=3):
    sums += gcd(a, b, c)
# for a in range(1, K+1):
#     for b in range(1, K+1):
#         for c in range(1, K+1):
#             sums += gcd(a, b, c)

print(sums)

Submission status: Wrong Answer

Solution code:
N = int(input())
total = 0
for i in range(N):
	if i % 3 != 0 and i % 5 != 0:
		total += i
 
print(total)

Submission status: Wrong Answer

Solution code:
inputStr = input()

for c in inputStr:
    if c == '7':
        print("YES")
        exit()

print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
N = list(str(n))
if 7 in N:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
num= int(input())
if '7'in str(num):
  print('yes')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
N = int(input())

A = N // 100
B = (N//10) - A*100
C = N % 10


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

Submission status: Wrong Answer

Solution code:
N = int(input())

A = N // 100
B = (N//10) - A*100
C = N % 10


if (A%7)==0 or (B%7)==0 or (C%7)==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
x = n / 100
y = (n - x*100) / 10
z = n % 10
if x == 7 or y == 7 or z == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input().split()


res=['Yes' if i =='7' else 'No' for i in s ]
  
for i in res:
  if(i=='Yes'):
    res=i
    break

  else:
    res=i
print(res)

Submission status: Wrong Answer

Solution code:
import fractions

K = int(input())

total = 0

listK = list(range(K))

for i in listK:
    for j in listK:
        for k in listK:
            gcd1 = fractions.gcd(i+1,j+1)
            total += fractions.gcd(gcd1,k+1)

print(total)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i +1% 3 != 0):
        if (i +1% 5 != 0):
           sum += i
 
print(sum)

Submission status: Wrong Answer

Solution code:
input_num = input("Enter a number between 100 and 999: " )
input_int = int(input_num)

if str(input_int)[-1] == '7':
  print("Yes")
elif str(input_int)[-2] == '7':
  print("Yes")
elif str(input_int)[-3] == '7':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
print("YES" if "7" in list(input()) else "NO")

Submission status: Wrong Answer

Solution code:
import math
import itertools

def culc_gcd_of_3(l_p):
    answer = 0
    for x in l_p:
        temp = math.gcd(x[0], x[1])
        
        if temp == 1:
            answer += 1
        else:
            answer += math.gcd(x[2], temp)
    
    return answer
 
 
K = int(input())
l_p = list(itertools.product(range(1, K+1), range(1, K+1), range(1, K+1)))
 
print(culc_gcd_of_3(l_p))

Submission status: Wrong Answer

Solution code:
n = list(input())
if '7' in n:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
total = 0
for i in range(N):
	if i % 3 != 0 and i % 5 != 0:
		total += i

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input( ))
b = N % 10
if (b == 7):
	print("yes")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
import itertools
import math
n = int(input())

lst = [_ for _ in range(1, n+1)]
lst2 = list(itertools.permutations(lst, 3))
lst3 = list(itertools.permutations(lst, 2))
l2 = sum([math.gcd(math.gcd(_[0],_[1]),_[2]) for _ in lst2])
l3 = sum([math.gcd(_[0], _[1]) for _ in lst3]) * 3
l4 = sum(lst)

ans = l2 + l3 + l4

print(ans)

Submission status: Wrong Answer

Solution code:
def u(a,b):
  if(a<b):
    z = b
    b = a
    a = z
  r = a % b
  while(r!=0):
    a = b
    b = r
    r = a % b
  return b
 
l = int(input())
s = 0
for i in range(1,l+1):
  for i2 in range(1,l+1):
    z = u(i,i2)
    for i3 in range(1,l+1):
      z2 = u(z,i3)
      s+=z2
print (s)

Submission status: Wrong Answer

Solution code:
input_num = input("Enter a number between 100 and 999: " )
input_int = int(input_num)

if str(input_int)[-1] == '7':
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a = int(input( ))
b = a % 10
if (b == 7):
	print("yes")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
def compute_gcm(x, y):
  if x == y:
    return x
  if x < y:
    s = x
    x = y
    y = s
  if x==1:
    return 1
  a = x%y
  if a == 0:
    return y
  return compute_gcm(y, a)

#print(compute_gcm(4,compute_gcm(2,2)))
k = int(input())
res = k**3-(k-1)**3
same1 = 0
same2 = 0
rate = [6,3,1]
for p in range(2,k+1):
  for q in range(p, k+1):
    same1 = int(p==q)
    gcm1 = compute_gcm(q,p)
    for r in range(q, k+1):
      same2 = int(q==r)
      gcm = compute_gcm(r,gcm1)
      res += gcm*rate[same1+same2]
      #print("p:{}, q:{}, r:{}, gcm:{}, rate:{}, sum:{}".format(p,q,r,gcm,rate[same1+same2],res))
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
for i in range(N+1):
  if i % 3 != 0 and i % 5 != 0:
    count += i
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
import math
count=0
a=1
b=1
c=1
for i in range(n):
    for j in range(n):
        for m in range(n):
            k=math.gcd(a,b)
            l=math.gcd(k,c)
            count+=l
            c+=1
        c=1
        b+=1
    b=1
    a+=1
print(count)

Submission status: Wrong Answer

Solution code:
n = input()

if "7" in n:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
result = 0
for i in range(1,n):
    if i % 5 == 0:
        result = result
    elif i % 3 == 0:
        result = result
    else:
        result += i
print(result)

Submission status: Wrong Answer

Solution code:
n = list(str(input()))
flag = True 
for i in range(len(n)):
  if n[i] == '7':
    print('YES')
    flag = False 
    break
if flag:
  print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input(""))
c=n%100
d=n%10
u=n%1
if c==7 or d==7 or u==7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
s=0
if int(N/100) == 7:
    print("Yes")
    s+=1
    

N = N % 100 
    

if s==0 and int(N / 10) == 7:
    print("Yes")
    s+=1

N = N % 10 

if s==0 and N / 1 == 7:
    print("Yes")
if s == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
a = int(input())
s = 0
for i in range(a+1):
 if(i%3!=0 and i%5!=0) :
   s+=i
print (s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input().count('7')
if n>0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import math
import itertools
from functools import reduce
a = int(input())
b = list(itertools.product(range(1,a+1),repeat=3))
c = 0
def gcd(*numbers):
    return reduce(math.gcd, numbers)
for i in b:
    n = gcd(i[0], i[1], i[2])
    c += n
print(c)

Submission status: Wrong Answer

Solution code:
x = int(input())
N = 0
 
for i in range(1,x+1):
    if i%3==0 and i%5==0:
        i = 'FizzBuzz'
    elif i%3==0:
        i = 'Fizz'
    elif i%5==0:
        i = 'Buzz'
    else:
        N = i + N
        
print(N)

Submission status: Wrong Answer

Solution code:
N= input()
if(N[0] == str(7)):
    print("Yes")
elif(N[1] == str(7)):
    print("Yes")
elif(N[2] == str(7)):
    print("Yes")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
num = [int(x) for x in input().split()]

for n in num:
    if n == 7:
        print("Yes")
        break
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = str(input())
flag = 0

for i in range(3):
    if N[i] == 7:
        flag = 1

if flag == 1:
    print('Yes')
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = input()  # 1234を整数(int)型ではなく、文字列(str)型で変数に格納する
if(a==7 or b==7 or c==7): print("Yes")
else:print("No")

Submission status: Wrong Answer

Solution code:
N = str(input())
flag = 0

for i in range(3):
    if N[i] == 7:
        flag = 1

if flag == 1:
    print('Yes')
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
s=0
if N/100 == 7:
    print("Yes")
    s+=1
    

N = N % 100 
    

if s==0 and int(N / 10) == 7:
    print("Yes")
    s+=1

N = N % 10 

if s==0 and N / 1 == 7:
    print("Yes")
if s == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
num = int(input())
n10 = num - 70
n1 = num - 7
if num - 700 <= 99 and 0 <= num - 700:
  print("Yes")
elif n10 % 100 >= 0 and n10 % 100 <=9:
  print("Yes")
elif n1 % 10 == 0:
  print("Tes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
re = 0
for i in range(N):
    if i % 3 == 0 or i % 5 == 0:
        re = re + 0
    else:
        re = re + i
print(re)

Submission status: Wrong Answer

Solution code:
if '7' in 'N':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
user_input = input("enter the number: ")
for i in user_input:
    if i == "7":
        print("Yes")
        break
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(99999999)

inputno = input()

sum = 0
for i in range(int(inputno)):
  
  if (i % 3 != 0) and (i % 5 != 0):
    sum += i  
  
print(sum)

Submission status: Wrong Answer

Solution code:
import math


def get_gcd(n_1, n_2, n_3):
    n_list = [n_1, n_2, n_3]
    a = list(map(int, n_list))
    N = 3
    ans = a[0]
    for i in range(1, N):
        ans = math.gcd(ans, a[i])
    return ans


sum = 0
k = int(input())
for i in range(1, k+1):
    for j in range(1, k + 1):
        for l in range(1, k + 1):
            sum += get_gcd(i, j, l)
print(sum)

Submission status: Wrong Answer

Solution code:
x = str(input())
a = x[0]
b = x[1]
c = x[2]

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

Submission status: Wrong Answer

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

n = int(input())
a = n // 100
if a == 7:
    print("Yes")
b = (n - a*100) // 10
if b == 7:
    print("Yes")
c = (n - a*100 - b*10)
if c == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = input()
b = str(a)
print(b)
if '7' in b:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
t=input()
if t.count("7")!= 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import math

x=int(input())
s=math.floor(x/3)
f=math.floor(x/5)
sf=math.floor(x/15)

s_sum=math.floor(3*s*(s+1)/2)
f_sum=math.floor(5*f*(f+1)/2)
sf_sum=math.floor(15*sf*(sf+1)/2)

sum=s_sum+f_sum-sf_sum
print(math.floor(sum))

Submission status: Wrong Answer

Solution code:
N = int(input())
l = []
for i in range(N):
    if i % 3 == 0:
        l.append("Fizz")
    elif i % 5 == 0:
        l.append("Buzz")
    else:
        l.append(i)
re = 0
for j in l:
    if j == "Fizz" or j=="Buzz":
        re = re + 0
    else:
        re = re + j
print(re)

Submission status: Wrong Answer

Solution code:
N = int(input())
s=0
if N/100 == 7:
    print("Yes")
    s+=1
    

N = N % 100 
    

if int(N / 10) == 7:
    print("Yes")
    s+=1

N = N % 10 

if N / 1 == 7:
    print("Yes")
if s == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
def main(N):
    has_seven = False
    N = str(N)
    for i in range(len(N)):
        if N[i] == '7':
            has_seven = True
            break

    if has_seven:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding:UTF-8 -*-
import os,sys

n=int(input())
ans = 0
while (n) :
    if (7==n%10) :
        print("Yes")
        sys.exit(0)
    n = n/10

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8
import math
import itertools
from functools import reduce

def gcd(*num):
    return reduce(math.gcd, num)


if __name__ == "__main__":

    k = int(input())
    ans = 0

    num = list(range(1, k+1))
    comb = list(itertools.product(num, repeat=3))


    for i in range(len(comb)):
        ans += gcd(comb[i][0], comb[i][1], comb[i][2])

    print(ans)

Submission status: Wrong Answer

Solution code:
a = input()
b = len(a)
i = 0
while i<=b:
    c = a[i]
    if c==7:
        print('yes')
        break
    
    i += 1
    if i==b:
        print('no')
        break

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
from itertools import product

def gcd(*numbers):
    return reduce(math.gcd, numbers)

n = int(input())

l = product(range(1, 1+n), repeat=3)

print(sum([gcd(*i) for i in l]))

Submission status: Wrong Answer

Solution code:
t=input()
if t.count("7") == 0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
def main(N):
    has_seven = False
    for i in range(len(str(N))):
    	if N[i] == '7':
        	has_seven = True
        	break
        
    if has_seven:
    	print("Yes")
    else:
    	print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n % 10
b = n // 10
c = n // 100
if (a == 7 or b == 7 or c == 7) :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
K = int(input())

import itertools
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

lis = [i for i in range(1,K+1)]
s = 0
for team in itertools.product(lis, repeat = 3):
    s += gcd_list(team)
print(s)

Submission status: Wrong Answer

Solution code:
input_num = input("Enter a number between 100 and 999: " )

if input_num[-1] == '7':
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
#I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
str = input()


list = str.split()

bool = False
for a in list:
    if a == '7':
        bool = True
        break

if bool == True:
    print('Yes')
else:
    print('No')