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:
s=input()
 
if s[0]==7 or s[1]==7 or s[2]==7:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
s=input()
c=0
for i in range(3):
  if s[i]==7:
    c=c+1
if c>0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=input()
c=0
for i in range(len(s)):
  if s[i]==7:
    c=c+1
  else:
    c=c
    
if c>0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
A = input("3numbers")
if A in [7]:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = input()
print('7' in N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(1)

Submission status: Wrong Answer

Solution code:
N = list(input())
for i in range(2):
  if N[i] == "7":
    print("Yes")
  break
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce

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

k = int(input())
sum_ans = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        gcd_ab = gcd(a, b)
        for c in range(1, k+1):
            gcd_abc = gcd(gcd_ab, c)
            sum_ans += gcd_abc
print(sum_ans)

Submission status: Wrong Answer

Solution code:
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

N = readInt()

if 100<=N and N<=999:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
print(n[-1], n[-2], n[-3])
if n[-1]==7 or n[-2]==7 or n[-3]==7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
if "7" in n:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
if '7' in n:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
K =int(input())
list =[]
for a in range(1,K+1) :
    for b in range(1,K+1) :  
        t = math.gcd(a,b)    #全ての場合についての最大公約数を求める
        for c in range(1,K+1) :
           list.append(math.gcd(t,c))  #リストに格納して、合計値を求める
print(sum(list))

Submission status: Wrong Answer

Solution code:
n=int(input())
f=1
while n>0:
  if n%10==7:
    print("Yes")
    break;
  else:
    f=0
  n/=10
if f==0:
  print("No")

Submission status: Wrong Answer

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

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):
        tmp=math.gcd(i,j)
        for l in range(1,K+1):
            sum+=math.gcd(tmp,l)
print(sum)

Submission status: Wrong Answer

Solution code:
def sort_2(a,b):
    if b<a:
        c=a
        a=b
        b=c
    return [a,b]


def GCDbase(a,b):
    D=b//a
    if b==D*a:
        return a
    else:
        return GCD(b-a*D,a)
    
def GCD(a,b):
    ab=sort_2(a,b)
    return GCDbase(ab[0],ab[1])
    
    
def sort_3(a,b,c):
    if b<a:
        d=a
        a=b
        b=d
    if c<b:
        d=c
        c=b
        b=d
    if b<a:
        d=a
        a=b
        b=d
    return [a,b,c]

def gcd(a,b,c):
    abc=sort_3(a,b,c)
    a=abc[0]
    b=abc[1]
    c=abc[2]
    return GCD(GCD(a,b),c) 

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

Submission status: Wrong Answer

Solution code:
n = input()
flag = 1

for num in n:
    if int(num) % 7 == 0:
        flag = 0

if flag == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
for n in N:
  if int(n)%7==0:
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

Solution code:
N=input()
for n in N:
  if int(n)%7==0:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=[input()]
if N.count("7")>=1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# Code for A - Lucky 7
# Use input() to fetch data from STDIN
print("Hello world")

Submission status: Wrong Answer

Solution code:
#文字列の入力
S = input()

S_list = list(S)

ans = 0
for i in range(len(S_list)):
  if(S_list[i] == "7"):
    ans = 7
  else:
    ans = 0
    
    
    
if(ans == 7):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def func(N):
  N = int(N)
  for i in range(2):
    if int(N/10**i) % 10 == 7: return "Yes"
  return "No"

N = input()
print(func(N))

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    for i in range(3):
        if n%10 == 7:
            print("Yes")
            return
        n /= 10
    print("No")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = input()
ans=0
for i in n:
    if i==7:
        ans=1
if ans==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import re
# input
n = input()
# judge
if (re.match('.*7.*', n)):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
num = list(n)
print("7" in num)

Submission status: Wrong Answer

Solution code:
n=input().split()
def d(n):
    return "Yes" if "7" in n else "No"
print(d(n))

Submission status: Wrong Answer

Solution code:
n=map(int,input().split())
def d(n):
    return "Yes" if 7 in n else "No"
print(d(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n // 100
n = n % 100
b = n // 10
n = n % 10
c = n
if a == 7 | b ==7 | c == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()
n = int(N)
if 100 <= n <= 999 :
    if '7' in N:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:


num = input("Enter a number: ")
if len(num) == 3:
    if "7" in num:
        print("Yes")
    else:
        print("No")
else:
    print("The input is not of three digits.")

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
if N >= 2 :
    An = np.zeros(N+2)
    #An = [[] for _ in range(1,N+2)]
    #print(An)
    for s in range(1,N+1) :
        #print(s)
        if s%3 != 0 and s%5 != 0 :
            An[s] = int(s) 
            #print(s)
            #print(An[s])
    ans = np.sum(An)

else:
    ans = int(1)

print (int(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

x = 0

for i in range(N+1):
  if i % 3 != 0 and i % 5 != 0:
    x += i
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
  
N = input()
for i in N:
    if i == '7':
        print('Yes')
        break
        
print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
  
N = input()
for i in N:
    if i == '7':
        print('Yes')
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=set()
while n!=0 :
    rem=n%10
    a.add(rem)
    n/=10
if 7 in a :
    print("Yes")
    
else :
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()

flag = False

for char in N:
  if char == '7':
    print('Yes')
    flag = True

if flag == False:   
  print('No')

Submission status: Wrong Answer

Solution code:
N = input()

for char in N:
  if char == '7':
    print('Yes')

print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n//100
b, c = divmod(n, 10)
if a == 7 or b == 7 or c == 7:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
ans='No'
for i in a:
  if i==7:
    ans='Yes'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = input()
s = str(i)
print(s[-1])
if s[-1] == "7":
    print("Yes")
elif s[-2] == "7":
    print("Yes")
elif s[-3] == "7":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=input()

"7" in N

if False:
  print("No")
elif True:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N=input()

print("7" in N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#A
n = input()
if n.count("7") == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
a=1;b=1;c=1;d=0
n=int(input());
for i1 in range(n):
	for i2 in range(n):
		for i3 in range(n):
			d+=reduce(math.gcd,(a,b,c))
			c+=1
		b+=1;c=1
	a+=1;b=1
print(d)

Submission status: Wrong Answer

Solution code:
n = input()
for ni in n:
    if ni == '7':
        print('YES')
        quit()
print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
if 0 <= n % 700 < 100 or 0<= (n % 100) % 70 < 10 or (n % 10) == 7:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
if '7' in list(input()):
    print('yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input("Enter any three digit no.  "))
if n%10==7 or n%100==7 or n%1000==7:
        print("yes")
else:
     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:
N = int(input())
a = 0
for i in range(N+1):
    if not i % 3==0 or not i % 5 == 0:
        a += i
print(a)

Submission status: Wrong Answer

Solution code:
n=input()
n=str(n)
t='nd'
for i in n:
    if i=='7':
        print('Yes')
        t='d'
if t=='nd':print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
h = N % 100
t = (N - h*100) % 10
o = N - h*100 - t*10
if h == 7 or t == 7 or o == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from math import *

K = int(input())

sum = 0
for i in range(K):
  for j in range(K):
    for k in range(K):
      sum += gcd((i+1),gcd((j+1),(k+1)))

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
n=1
for i in range(2):
  if N[i] == "7":
    print("Yes")
    n=0
    break
if n==1:
  print("No")

Submission status: Wrong Answer

Solution code:
n=input()
ans=0
for i in range(3):
    if int(n[i]) == 7:
        ans=1
print("YES" if ans == 1 else "NO")

Submission status: Wrong Answer

Solution code:
N = str(input())

if N.find('7'):
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math as mat
N = int(input())
A = int(mat.floor(N/100))
B = int(mat.floor((N-A*100)/10))
C = int(mat.floor(N-A*100-B*10))
if A == 7 or B == 7 or C == 7 :
    ans = str('yes')
else:
    ans = str('no')

print(ans)

Submission status: Wrong Answer

Solution code:
import math as mat
N = int(input())
A = int(mat.floor(N/100))
B = int(mat.floor((N-A*100)/10))
C = int(mat.floor(N-A*100-B*10))
if A == 7 or B == 7 or C == 7 :
    ans = 'yes'
else:
    ans = 'no'

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
result = 0

for i in range(1, n + 1):
  if not i % 3 == 0 and not i % 5 == 0:
    result += i
    
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = list(map(int, input()))

c = 0

for i in range(len(l)):
  if l[i] == 7:
    c +=1
  else:
    c = 0
    
if c >= 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

if a*b*c%7 == 0 :
  print("Yes")
else: print("No")

Submission status: Wrong Answer

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

N = int(input())
result = [gcd(gcd(i,j),k) for i in range(1,N+1) for j in range(1,N+1) for k in range(1,N+1)]
print(sum(result))

Submission status: Wrong Answer

Solution code:
print('yes' if '7' in input() else 'No')

Submission status: Wrong Answer

Solution code:
n=int(input())
f=0
while n>0:
  if n%10==7:
    f=1
    break
  n/=10
if f==0:
  print("No\n")
else:
  print("Yes\n")

Submission status: Wrong Answer

Solution code:
N = input()

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

Submission status: Wrong Answer

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = str(sys.stdin.read())
flag = False

for s in N:
    print(s)

    if s == '7':
        flag = True

if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = input()

if N[-1] == 7 or N[-2] == 7 or N[-3] == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N= str(input())
if "7" in N:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N= str(input())
if "7" in N:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input());

if N%10 == 7:
  print("Yes")
elif (N - N%10)%10 == 7:
  print("Yes")
elif (N- N%100) == 700:
  print("Yes") 
else :
  print("No")

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
if N%10 == 7:
  print("Yes")
elif (N-N%10)%100 == 70:
  print("Yes")
elif N/100 == 7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())

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

Submission status: Wrong Answer

Solution code:
s = list(input())
# print(s[0])
if int(s[0])%7==0 or int(s[1])%7==0 or int(s[2])%7==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# P3:
def get_gcd(numbers):
    """Helper function to get GCD of list of numbers."""
    import math
    from functools import reduce

    if 1 in numbers:
        return 1

    # gcd is associative
    return reduce(lambda x, y: math.gcd(x, y), numbers)


def sum_of_gcd_tuples():
    K = int(input())
    total = 0
    for a in range(1, K + 1):
        for b in range(1, K + 1):
            for c in range(1, K + 1):
                total += get_gcd([a, b, c])

    print(total)


sum_of_gcd_tuples()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
if a-7 % 10 == 0:
  print("Yes")
elif a-70 % 100 < 10:
  print("Yes")
elif a >= 700 and a < 800:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
A = input()
for i in range(len(A)):
    if A[i] == '7':
        YN = 'Yes'
    else:
        YN = 'No'
print(YN)

Submission status: Wrong Answer

Solution code:
s = "input()"
if s[0] is "7":
  print("Yes")
elif s[1] is "7":
  print("Yes")
elif s[2] is "7":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = "127"
if s[0] is "7":
  print("Yes")
elif s[1] is "7":
  print("Yes")
elif s[2] is "7":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = input()
x = len(n)
for i in range(x):
    if n[i] is '7':
        print('Yes')
        break

Submission status: Wrong Answer

Solution code:
a = int(input())
ans  = 0
for i in range(1,a+1):
    if i%3 == 0 or i%5 == 0:
        continue
    else:
        ans += i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
k = int(input())

ans = 0
for a in range(1,k+1):
  for b in range(1,k+1):
    tmp = math.gcd(a,b)
    for c in range(1,k+1):
      ans += math.gcd(tmp,c)

print(ans)

Submission status: Wrong Answer

Solution code:
#ライブラリの読み込み
import math

#変数の初期化
text = 0
count = 0

#入力値の格納
n = int(input())

#計算
while count < n:
    if (count % 3 != 0) and (count % 5 != 0):
        text = text + count
    count += 1

#表示
print(text)

Submission status: Wrong Answer

Solution code:
#文字列の入力
n = str(input())

#7が含まれるかどうか判別
if n.find("7") > 0 :
    text = "Yes"
else :
	text = "No"

#表示
print(text)

Submission status: Wrong Answer

Solution code:
n = input()
if n in "7":
    print("Yes")
else:
   print("No")

Submission status: Wrong Answer

Solution code:
N = input()

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

Submission status: Wrong Answer

Solution code:
N=str(input())
for i in range(len(N)):
  if N[i]=='7':
    print("YES")
    break
  if i==len(N)-1:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int( input() )
flag = 0

while n > 0:
    if n%10 == 7:
        flag = 1
        print("YES")
        break
    else:
        n = int( n / 10 )

if flag == 0:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int( input() )

while n > 0:
    if n%10 == 7:
        print("YES")
        exit()
    else:
        n = int( n / 10 )

print("NO")

Submission status: Wrong Answer

Solution code:
n = int( input() )

while n > 0:
    if n%10 == 7:
        print("YES")
        exit()
    else:
        n = n // 10

print("NO")

Submission status: Wrong Answer

Solution code:
from math import gcd
import sys
input = sys.stdin.readline

n = int(input())
s = input().strip()
R = [0] * (n + 1)
G = [0] * (n + 1)
B = [0] * (n + 1)
ans = 0
for i in range(len(s)):
    R[i + 1] = R[i]
    G[i + 1] = G[i]
    B[i + 1] = B[i]
    if s[i] == 'R':
        R[i + 1] += 1
    elif s[i] == 'G':
        G[i + 1] += 1
    else:
        B[i + 1] += 1
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[i] == 'R' and s[j] == 'B':
            ans += G[j + 1] - G[i]
            if (i + j) % 2 == 0 and s[(i + j) // 2] == 'G':
                ans -= 1
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[i] == 'R' and s[j] == 'G':
            ans += B[j + 1] - B[i]
            if (i + j) % 2 == 0 and s[(i + j) // 2] == 'B':
                ans -= 1
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[i] == 'B' and s[j] == 'R':
            ans += G[j + 1] - G[i]
            if (i + j) % 2 == 0 and s[(i + j) // 2] == 'G':
                ans -= 1
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[i] == 'B' and s[j] == 'G':
            ans += R[j + 1] - R[i]
            if (i + j) % 2 == 0 and s[(i + j) // 2] == 'R':
                ans -= 1
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[i] == 'G' and s[j] == 'R':
            ans += B[j + 1] - B[i]
            if (i + j) % 2 == 0 and s[(i + j) // 2] == 'B':
                ans -= 1
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[i] == 'G' and s[j] == 'B':
            ans += R[j + 1] - R[i]
            if (i + j) % 2 == 0 and s[(i + j) // 2] == 'R':
                ans -= 1


print(ans)

Submission status: Wrong Answer

Solution code:
N = input()
print('7' in N)

Submission status: Wrong Answer

Solution code:
N = list()
if "7" in N:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
A = math.floor((N / 100))
B = math.floor(((N - (100*A)) / 10))
C = (N-100*A-10*B)



if A == 7:
    print("yes")
elif B == 7:
    print("yes")
elif C == 7:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = input()
print("Yes" if n in "7" else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())
 
n = str(n)
 
flag = 0
 
for i in n:
  if(i != '7'):
    flag = 0
  else:
    flag = 1
 
    
if flag == 0:
  print('No')
else :
  print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())

n = str(n)

flag = 0

for i in n:
  if(i != '7'):
    flag = 0
  else:
    flag = 1

    
print(flag)

Submission status: Wrong Answer

Solution code:
from functools import lru_cache

K = int(input())
sum = 0

@lru_cache()
def gcd(x,y):
  r = x % y
  while r> 0:
    x = y
    y = r
    r = x%y
  return y
  
for a in range(K):
  for b in range(K):
    for c in range(K):
      sum += gcd(gcd(a+1,b+1),c+1)
print(sum)

Submission status: Wrong Answer

Solution code:
def lucky7(n):
  if '7' in str(n):
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
def lucky7(n):
  if '7' in str(n):
    return 'Yes'
  else:
    return 'No'

Submission status: Wrong Answer

Solution code:
N=int(input())

M=N-7
if M%10==0:
  print("Yes")
else:
  M=N//10-7
  if M%10==0:
    print("Yes")
  else:
    M=N//100-7
    if M%10==0:
      print("Yes")
    else:
    	print("NO")

Submission status: Wrong Answer

Solution code:
# import single number
def import_number():
    return int(input())

# import n line int
def import_int(n):
    return [int(input()) for i in range(n)]

n = import_number()
tmp = n % 100
if n / 100 == 7:
    print('Yes')
elif tmp / 10 == 7:
    print('Yes')
elif tmp % 10 == 7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import time
startTime = time.time()

N = 476
s = str(N)
b = "No"
if "7" in s:
    b = "yes"
print(b)

endTime = time.time()
elapsed_time = endTime-startTime
print(f"経過時間：{elapsed_time}")

Submission status: Wrong Answer

Solution code:
import scipy

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=list(input())
for i in range(len(n)):
	if n[i]=="7":
		print("Yes")
		exit()

Submission status: Wrong Answer

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

N = list(input())

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()
if '7' in N:
  print('yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = int(s)
s = [ int (x) for x in s ]
if n > 100 and n < 999 :
    for a in s :
        if a == 7:
            print("Yes")
            break
    else :
        print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())

from math import gcd

k=0
ans=0
for a in range(0,n):
    for b in range(0,n):
      k=gcd(a,b)
      for c in range(0,n):
          ans+=gcd(c,k)
                      
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
if s.find("7") == -1:
  print('No')
else:
  print('yes')

Submission status: Wrong Answer

Solution code:
input_int = input()

if '7' in input_int:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
n = int(input())
isOK = False
for i in range(3):
    first_digit_num = n % 10
    if(first_digit_num == 7):
        isOK = True
    n /= 10
print("Yes" if isOK else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def find_7(num):
	num_list = list(map(int, str(num)))
	count = 0
	for x in num_list:
		count += 1
		if x == 7:
			return "Yes"
		elif count == len(num_list):
			return "No"

Submission status: Wrong Answer

Solution code:
def find_7(num):
	num_list = list(str(num))
	for x in num_list:
		if x == '7':
			ans = "Yes"
			break
		else:
			ans = "No"

	return ans

if __name__ == '__main__':
	print (find_7(777))

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(3):
    if (N%10)==7:
        break
    N=N//10
if N!=0:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
num = int(input())
if str(num).find('7'):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
num = int(input())
if str(num).find('7'):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

ans = "No"

for i in range(3):
    if s[i] == 7:
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

Solution code:
K = input()

#ユーグリッド互除法（再起）
def gcd(p, q):
  # ユーグリッド互除法
  if (p%q==0):
    return q
  else:
    return gcd(q, p%q)

ans = 0

#すべての組合せ(n^3)
abc_list = []
for a in range(1, int(K)+1):
  for b in range(1, int(K)+1):
    for c in range(1, int(K)+1):
        gcd_ab = gcd(a, b)
        gcd_abc = gcd(gcd_ab, c)
        ans += gcd_abc

print(ans)

Submission status: Wrong Answer

Solution code:
N = str(input())

list = [N[0], N[1], N[2]]
if 7 in list:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = input()

list = [N[0], N[1], N[2]]
if 7 in list:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
param = input()

ret = None
if param in '7':
  ret = 'Yes'
else:
  ret = 'No'
  
print(f'{ret}')

Submission status: Wrong Answer

Solution code:
import itertools
k=int(input())
def solve(a,b):
	if a<b:
		if b%a==0:
			return a
		else:
			return solve(a,b%a)
	if a%b==0:
		return b
	else:
		return solve(b,a%b)
arr=[i+1 for i in range(k)]

l = [p for p in itertools.product(arr, repeat=3)]
s=0
dic={}
for i in l:
	a,b,c=i
	s+=solve(c,solve(a,b))
print(s)

Submission status: Wrong Answer

Solution code:
N = list(input())
b = False
for i in range(3):
    print(N[i])
    if N[i] == str(7):
        b = True
if b == False:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a = str(input())
ans = 'yes'if any([i=='7' for i in a]) else 'no'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
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 += math.gcd(math.gcd(a,b),c)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())

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

ans = 0

for i in range(1, k+1):
    for m in range(1, k+1):
        x = gcd(i, m)
        for n in range(1, k+1):
            ans += gcd(n, x)

print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())

if x % 3 == 0 and x % 5 == 0:
    print('FizzBuzz')
elif x % 3 == 0 and x % 5 != 0:
    print('Fizz')
elif x % 3 != 0 and x % 5 == 0:
    print('Buzz')
else:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
a=[int(c) for c in N]
if a[0]==7 or a[1]==7 or a[2]==7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N=input()
a=[int(c) for c in N]
if a[0]==7 or a[0]==7 or a[0]==7:
    print("YES")
else:
    print("NO")