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: Runtime Error

Solution code:
num=int(input())
list_num=list(input)
for i in range(list_num):
  if i=7:
    return Yes
    
return No

Submission status: Runtime Error

Solution code:
string=inout()
t=False
for i in range (len(string)):
  if string[i]==7:
    t=True
if t==True:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
s = s.replace('R', '0')
s = s.replace('G', '1')
s = s.replace('B', '2')

s0 = [0] * (n + 5)
s1 = [0] * (n + 5)
s2 = [0] * (n + 5)

for i in range(n):
    s0[i + 1] = s0[i] + (s[i] == '0')
    s1[i + 1] = s1[i] + (s[i] == '1')
    s2[i + 1] = s2[i] + (s[i] == '2')

#print(s0)
#print(s1)
#print(s2)

ans = 0
for i in range(n):
    for j in range(i + 1, n):
        if s[i] == s[j]: continue
        h = 99 - (ord(s[i]) + ord(s[j]))
        if h == 0:
            ans += s0[n] - s0[j]
            if 2 * j - i < n and s[2 * j - i] == '0': ans -= 1
        if h == 1:
            ans += s1[n] - s1[j]
            if 2 * j - i < n and s[2 * j - i] == '1': ans -= 1
        if h == 2:
            ans += s2[n] - s2[j]
            if 2 * j - i < n and s[2 * j - i] == '2': ans -= 1
        #print(i, j, h, ans)
print(ans)

"""
[0]12120121

S0[1] = 1
S1[1] = 0
S2[1] = 0

[01]2120121

S0[2] = 1
S1[2] = 1
S2[2] = 0

:

[012120121]

S0[9] = 2
S1[9] = 4
S2[9] = 3

01212[0121]

S1[9] - S1[5]

"""

Submission status: Runtime Error

Solution code:
a = input()
third = a % 100
second = a % 10 - thrid * 10
first = a - (third *100 +second*10)
if(third == 7 or second == 7 or first == 7):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
s=input()
R=s.count("R")
G=s.count("G")
B=s.count("B")
ans=R*G*B

#全探索する
for i in range(N-2):
  a=s[i]
  for j in range(i+1,N-1):
    if a==s[j]:
      continue
    b=s[j]
    k=2*j-i
    if "R" not in a+b:
      try:
        if s[k]=="R":
          ans-=1
      except:
        pass
      
    if "G" not in a+b:
      try:
        if s[k]=="G":
          ans-=1
      except:
        pass
      
    if "B" not in a+b:
      try:
        if s[k]=="B":
          ans-=1
      except:
        pass

print(ans)

Submission status: Runtime Error

Solution code:
N=input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A=input()

if A in "7":
  print("Yes")

else:
  print("No
")

Submission status: Runtime Error

Solution code:
n = input()
return "7" in n

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

a = int(N/100)
b = int( (N-a*100)/10 )
c = int(N-a*100-b*10)

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = list(input())
Sum = 0
for k in range(3,N+1):
    for j in range(2,k):
        for i in range(1,j):
            if abs(j - i) != abs(k - j):
                if S[i-1] != S[j-1] and S[j-1] != S[k-1] and S[k-1] != S[i-1]:
                  Sum += 1
print(Sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = 117
if '7' in x:
    print('yes')
else:
    print('no')

Submission status: Runtime Error

Solution code:
x = 117
if '7' in x
    print('yes')
else:
    print('no')

Submission status: Runtime Error

Solution code:
#ABC162A
import sys
N = sys.stdin.readline().rstrip()

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

#ABC162B
import sys
N = int(sys.stdin.readline())
total=0
for i in range(1, N+1):
    if i%3 !=0 and i%5 !=0:
        total+=i
    
print(total)

Submission status: Runtime Error

Solution code:
c =0

N = int(input())+1
S = tuple(input())


for i in range(1,N):
    for j in range(1,N):
        if i > j:
                continue
        elif S[i-1] == S[j-1]:
                continue
        for k in range(1,N):
            if j > k:
                continue
            elif S[i-1] == S[k-1] or S[j-1] == S[k-1]:
                continue
            elif j - i == k - j:
                continue
            else:
                c += 1
print(c)

Submission status: Runtime Error

Solution code:
c =0

N = int(input())+1
S = tuple(input())


for i in range(1,N):
    for j in range(1,N):
        if i > j:
                continue
        elif S[i-1] == S[j-1]:
                continue
        for k in range(1,N):
            if j > k:
                continue
            elif S[i-1] == S[k-1] or S[j-1] == S[k-1]:
                continue
            elif j - i == k - j:
                continue
            else:
                c += 1
print(c)

Submission status: Runtime Error

Solution code:
def main():
  xs <- input().split("")

  if "7" in xs:
    print("Yes")
  else:
    print("No")
    
if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
s=input()

for e in s:
  if e="7":
    print("Yes")
    break
else:
  print("No")

Submission status: Runtime Error

Solution code:
p=list(int(input()))
a=(p[0])
b=(p[1])
c=(p[2])
if a==7 or b==7 or c==7:
	print(Yes)
else:
	print(No)

Submission status: Runtime Error

Solution code:
p=list(input())
a=int(a[0])
b=int(a[1])
c=int(a[2])
if a==7 or b==7 or c==7:
	print(Yes)
else:
	print(No)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
ans = S.count("R")*S.count("G")*S.count("B")

for i in range(N):
  for j in range(i+1,N):
      k = 2*j-i
      if N>k and S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
          ans-=1
          
print(ans)

Submission status: Runtime Error

Solution code:
s = list[map(int, input().split())]
a = s.count(7)
if a == 0:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = list(int(input()))
seven = False
for i in range(len(N)):
  if N[i] == 7:
    seven = True
if seven:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<stdio.h>

int main(){
  
  	int N, summ, i;
  	i = 1;
  	summ = 0;
  
  	scanf("%d", &N);
  
  	while(i <= N){
    	if (N%3==0||N%5==0){
        	summ = summ;
        }
      	else{
        	summ += i;
        }
      	i++;
    }
  
  	printf("%d", summ);
	return 0;
}

Submission status: Runtime Error

Solution code:
n = str(input())
count = 0

for i in n:
  if (i=='7'):
    count++
    break
    
if (count!=0):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
N = input()

for s in N:
  if s == '7':
    return 'No'
return 'Yes'

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n1, n2, n3 = map(int, input().split())
n = [n1, n2, n3]
if 7 in n:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
input = int(input())
a = []
while(i <= input):
    if i%3 == 0 or i%5 == 0:
        pass
    else:
        a.append(i)
    i += 1
sum = 0
for j in a:
    sum = sum + a[j]
print(sum)

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
for i in range(3):
  if n[i] == 7:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
for i in range(3)
if n[i] == 7:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
for i in range(1e15):
  print(i)

Submission status: Runtime Error

Solution code:
import numpy as np

n = int(input())
a = list(map(int, input().split()))

a_array = np.array(a)

ans_array = np.zeros((n//2, n), dtype = np.int)

if n >=4:

  ans_array[0, 0] = a_array[0]
  ans_array[0, 1] = a_array[1]
  ans_array[0, 2] = a_array[2]

  for i in range(1, n//2):
    j = 2*(i+1)
    # print(i, j)
    ans_array[i, j-2] = ans_array[i-1, j-4] + a_array[j-2]
    ans_array[i, j-1] = max(ans_array[i-1, j-4], ans_array[i-1, j-3]) + a_array[j-1]
    if j < n:
      ans_array[i, j]  = max(ans_array[i-1, j-3], ans_array[i-1, j-2]) + a_array[j]
  # print(ans_array)

  print(np.max(ans_array[-1, -3:]))

else:
  print(max(a_array))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
r=a%10;
if(r==7):
  return "Yes"
else:
  a/=10
  r=a%10
  if r==7:
    return "Yes"
  else:
    a/=10
    r=a%10
    if r==7:
      return "Yes"
    else:
      return "No"

Submission status: Runtime Error

Solution code:
N = 123
N_sp = N.split("")

if(N_sp == 7):
  print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
number = int(input())
flag = False
for i in range(len(number)):
	if int(number[i])==7:
		flag = True
		break
if(flag):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

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

ans = S.count('R') * S.count('G') * S.count('B')
for i in range(N):
  for j in range(i+1,N):
    if (i+j)%2 :
      continue
    k = (i+j)//2
    if len(set([S[i],S[k],S[j]])) == 3:
      ans -= 1
      
print(ans)

Submission status: Runtime Error

Solution code:
N = input()

print('Yes' if '7' str(N) else 'No')

Submission status: Runtime Error

Solution code:
N=input()
while N!=0:
  if N%10==7:
    print("Yes")
    return
  N=N//10
print("No")
return

Submission status: Runtime Error

Solution code:
while N!=0:
  if N%10==7:
    print("Yes")
    return
  N=N//10
print("No")
return

Submission status: Runtime Error

Solution code:
N = input()
count = 0

for i in range(N):
    if N[i] == 7:
        print('yes')
        count += 1
        break
    
if count == 0:
    print('no')

Submission status: Runtime Error

Solution code:
x=input()
for y in x:
  if y=="7":
    print("Yes")
  else:
	print("No")

Submission status: Runtime Error

Solution code:
x=input()
for y in x:
  if y=="7":
    return "Yes"
return "No"

Submission status: Runtime Error

Solution code:
s = str(N)

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

Submission status: Runtime Error

Solution code:
s = N

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

Submission status: Runtime Error

Solution code:
str = N

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# 入力N:3桁の整数
N = input()
print("Yes" if str(N).index("7") != -1 else "No")

Submission status: Runtime Error

Solution code:
from sys import stdin
import numpy as np

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+=np.gcd(i,np.gcd(j,k))
print(str(ans)+"\n")

Submission status: Runtime Error

Solution code:
x=str(N)
for y in x:
  if y=="7":
    return "Yes"
return "No"

Submission status: Runtime Error

Solution code:
n = int(input())
if n%100 == 7:
  print(‘Yes’)
elif (n//10)%10 == 7:
  print(‘Yes’)
elif n//100 == 7:
  print(‘Yes’)
else:
  print(‘No’)

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
r, g, b = map(s.count, "RGB")
ans = r*g*b
for i in range(n):
    for j in range(i+1, n):
        k = 2*j - i
        if k<n and len(set([s[i], s[j], s[k]])) == 3:
            ans -= 1
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
for i in N:
  if i == '7':
    print('yes')
    return 0
print('no')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
S=0
l=[0 for _ in range(K)]
for i in range(K):
    j=K-i
    v=(K//j)**N-l[j-1]
    for w in range(j//2):
        if j%(w+1)==0:
            l[w]+=v
    S+=j*v
print(S%(10**9+7))

Submission status: Runtime Error

Solution code:
n = int(input())
n = str(n)

for i in n:
  if n == '7':
    print("YES")
  else:
    print("NO:)

Submission status: Runtime Error

Solution code:
N=int(input())
A=N//100
M=N%100
 
B=M//10
C=M%10
 
if 7 in [A,B,C]:
    print(Yes)
else:
    print(No)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
string_of_int = str(n)
for x in n:
  if (x=='7'):
    return True
  else:
    return False

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = list(input())

r = s.count("R")
g = s.count("G")
b = s.count("B")

a = r * g * b

for i in range(n):
    for j in range(i+1, n):
        k = 2 * j - i 
        if k > n-1:
            continue
        
        if s[i] != s[j] and s[j] != s[k] and s[k] != s[i]:
            a -= 1

print(a)

Submission status: Runtime Error

Solution code:
from itertools import product

x1 = int(input())
x2 = input()

R_i = [i for i, x in enumerate(x2) if x == "R"]
G_i = [i for i, x in enumerate(x2) if x == "G"]
B_i = [i for i, x in enumerate(x2) if x == "B"]

R = len(R_i)
G = len(G_i)
B = len(B_i)

xs = map(sorted, product(R_i, G_i))

s = 0
for a in xs:
    k = a[1]*2 - a[0]  # 2j-i
    if k in B_i:
        s +=1
    i = a[0]*2 - a[1]  # 2j-k
    if i in B_i:
        s +=1
    j = (a[0] + a[1]) / 2
    if j.is_integer():
        j = int(j)
        if j in B_i:
            s +=1
print(R*G*B - s)

Submission status: Runtime Error

Solution code:



N = input()

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

Submission status: Runtime Error

Solution code:
import numpy as np

n = int(input())
a = list(map(int, input().split()))

a_array = np.array(a)

if n % 2 == 3:
  sum_1 = np.sum(a_array[0:-1:2])
  sum_2 = np.sum(a_array[1::2])
  ans = max(sum_1, sum_2)

else:
  max_value = np.zeros((2, n), dtype = np.int)
  max_value[0, 0] = a_array[0]
  max_value[1, 0] = 1
  max_value[0, 1] = a_array[1]
  max_value[1, 1] = 1
  max_value[0, 2] = max((max_value[0,0] + a_array[2]), a_array[2])
  if (max_value[0, 0] + a_array[2]) > a_array[2]:
    max_value[1, 2] = 2
  else:
    max_value[1, 2] = 1 

  for i in range (3, n):
    if (a_array[i] + max_value[0, i-2]) >= (a_array[i] + max_value[0, i-3]):
      if ((i-1) // 2) <= (max_value[1, i-2] + 1) == (i+1) // 2:
        max_value[0, i] = a_array[i] + max_value[0, i-2]
        max_value[1, i] = max_value[1, i-2] + 1
      else:
        max_value[0, i] = a_array[i] + max_value[0, i-3]
        max_value[1, i] = max_value[1, i-3] + 1
    else:
      if ((i-1) //2) <= (max_value[1, i-3] + 1) == (i+1) // 2:        
        max_value[0, i] = a_array[i] + max_value[0, i-3]
        max_value[1, i] = max_value[1, i-3] + 1
      else:
        max_value[0, i] = a_array[i] + max_value[0, i-2]
        max_value[1, i] = max_value[1, i-2] + 1
  # print(max_value)
  # print(max_value[1, -1], max_value[1, -2], max_value[1, -3])
  # print(max_value[0, -1], max_value[0, -2], max_value[0, -3])
  if max_value[1, -1] == n // 2:
    ans_1 = max_value[0, -1]
  else: 
    ans_1 = -9999999999999999
  if max_value[1, -2] == n // 2:
    ans_2 = max_value[0, -2]
  else: 
    ans_1 = -9999999999999999
  if max_value[1, -3] == n // 2:
    ans_3 = max_value[0, -3]
  else: 
    ans_3 = -9999999999999999
  ans = max(max(ans_1, ans_2), ans_3)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int,input()

M = str(N)
print(M)

L = list(map(int, M))
print(L)

if L[0] == 7:
    print("Yes")
    
elif L[1] == 7:
    print("Yes")

elif L[2] == 7:
    print("Yes")

else:
    print("No")

Submission status: Runtime Error

Solution code:
def calc():
    for i in L:
        if L[i] == 7:
            print("Yes")
        else:
            return
    print("No")

N = int,input()

M = str(N)
print(M)

L = list(map(int, M))

calc()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
str = input()
is_contain = false
for i in str:
  if i == "7":
    is_contain = true
if(is_contain):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
A
#input
N = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input_string = input()
while n < len(input_string):
  if n == '7':
    print('Yes')
    n += 1
    break

Submission status: Runtime Error

Solution code:
from itertools import product

x1 = int(input())
x2 = input()

R = [i for i, x in enumerate(x2) if x == "R"]
G = [i for i, x in enumerate(x2) if x == "G"]
B = [i for i, x in enumerate(x2) if x == "B"]

group = map(sorted, product(R, G, B))
voter = [1 for i in group if (i[1] - i[0]) != (i[2] - i[1])]
print(sum(voter))

Submission status: Runtime Error

Solution code:
in=input()
for i in range(len(in)):
  if(in[i]=="7"):
    print("Yes")
    exit(0)
print("No")
s = input()
for i in range(len(s)):
  if(s[i]=='7'):
    print("Yes")
    exit(0)
print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
dp = [[0 for i in range(3)] for j in range(n+1)]
for i in range(1,n+1):
  ai = a[i-1]
  dp[i] = dp[i-1][:]
  if i%2:
    dp[i][0] += +ai
    dp[i][1] = max(dp[i-1][0],dp[i-1][1])
  if i%2 == 0:
    dp[i][1] += ai
    dp[i][2] = max(dp[i-1][1],dp[i-1][2])
  if i >= 3 and i%2:
    dp[i][2] += ai
if n%2 == 0:
  print(max(dp[-1][0],dp[-1][1]))
else:
  print(max(dp[-1][1],dp[-1][2]))

Submission status: Runtime Error

Solution code:
n = int(input())
A = list(map(int,input().split()))

def zenbu(m, B):
    if m == 1:
        return B[0]
    elif m == 2:
        return max(B[0],B[1])
    elif m == 3:
        return max(B[0],B[1],B[2])
    elif m%2 == 0: #偶数の場合
        temp = 0
        for i in range(m//2-1):
            temp += B[i*2]
        return max(temp+ max(B[m-2],B[m-1]), zenbu(m-2, B)+ B[m-1])
    else:#奇数の場合
        temp = 0
        for i in range((m-1)//2):
            temp += B[i*2]
        return max(temp, zenbu(m-2,B)+ B[m-1], zenbu(m-3,B)+ max(B[m-2],B[m-1]))

ans = zenbu(n,A)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N= input()
for i in range 3:
  if N[i]=='7':
    print('Yes')
    exit()

print('No')

Submission status: Runtime Error

Solution code:
s = input()
for '7' in list(s):
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    S = input()

    rcs = [0] * N
    gcs = [0] * N
    bcs = [0] * N

    for i in range(N):
        if S[i] == 'R':
            rcs[i] = 1
        elif S[i] == 'G':
            gcs[i] = 1
        elif S[i] == 'B':
            bcs[i] = 1

    for i in range(1, N):
        rcs[i] += rcs[i - 1]
        gcs[i] += gcs[i - 1]
        bcs[i] += bcs[i - 1]

    result = 0
    for i in range(N):
        if S[i] == 'R':
            for j in range(i + 1, N):
                if S[j] == 'R':
                    continue
                elif S[j] == 'G':
                    result += bcs[N - 1] - bcs[j]
                    t = 2 * j - i
                    if t < N and S[t] == 'B':
                        result -= 1
                elif S[j] == 'B':
                    result += gcs[N - 1] - gcs[j]
                    t = 2 * j - i
                    if t < N and S[t] == 'G':
                        result -= 1
        elif S[i] == 'G':
            for j in range(i + 1, N):
                if S[j] == 'G':
                    continue
                elif S[j] == 'R':
                    result += bcs[N - 1] - bcs[j]
                    t = 2 * j - i
                    if t < N and S[t] == 'B':
                        result -= 1
                elif S[j] == 'B':
                    result += rcs[N - 1] - rcs[j]
                    t = 2 * j - i
                    if t < N and S[t] == 'R':
                        result -= 1
        elif S[i] == 'B':
            for j in range(i + 1, N):
                if S[j] == 'B':
                    continue
                elif S[j] == 'R':
                    result += gcs[N - 1] - gcs[j]
                    t = 2 * j - i
                    if t < N and S[t] == 'G':
                        result -= 1
                elif S[j] == 'G':
                    result += rcs[N - 1] - rcs[j]
                    t = 2 * j - i
                    if t < N and S[t] == 'R':
                        result -= 1
    print(result)


main()

Submission status: Runtime Error

Solution code:
N = iter(list(input().split()))
  
if next(N) == "7":
  print("Yes")

else print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
S=input()
R=[]
G=[]
B=[]
for i in range(n):
    if S[i]=='R':
        R.append(i+1)
    elif S[i]=='G':
        G.append(i+1)
    else:
        B.append(i+1)
r=len(R)
g=len(G)
b=len(B)

c=0
for i in G:
    for j in B:
        min_n=min(i,j)
        max_n=max(i,j)
        d=abs(i-j)
        if max_n+d in R:
            c+=1
        if (i+j)%2==0 and (i+j)//2 in R:
            c+=1
        if min_n-d in R:
            c+=1

print(r*g*b-c)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
bc = n*[0]
gc = n*[0]
rc = n*[0]
for i in range(1, n+1):
    mi = n - i
    if s[n - i] == 'B':
        if i == 1:
            bc[mi] = 1
        else:
            bc[mi] = bc[mi+1] + 1
            rc[mi] = rc[mi+1]
            gc[mi] = gc[mi+1]
    elif s[mi] == 'R':
        if i == 1:
            rc[mi] = 1
        else:
            rc[mi] = rc[mi+1] + 1
            bc[mi] = bc[mi+1]
            gc[mi] = gc[mi+1]
    elif s[mi] == 'G':
        if i ==1:
            gc[mi] = 1
        else:
            gc[mi] = gc[mi+1] + 1
            rc[mi] = rc[mi+1]
            bc[mi] = bc[mi+1]
si = 0
for i in range(0, n - 1):
    
    for j in range(i+1, n-1):
        if s[j] != s[i]:
            d = j-i 
            if j+d < n:
                nc = s[j+d]
                if nc in [s[i], s[j]]:
                    l = list(set(['R', 'G', 'B']) - set([s[i], s[j]]))
                    if l[0] == 'R':
                        si+= rc[j+1]
                    elif l[0] == 'G':
                        si += gc[j+1] 
                    else:
                        si += bc[j+1]
                else:
                    l = list(set(['R', 'G', 'B']) - set([s[i], s[j]]))
                    if l[0] == 'R':
                        si+= rc[j+1]-1
                    elif l[0] == 'G':
                        si += gc[j+1] -1
                    else:
                        si += bc[j+1] - 1
            else:
                l = list(set(['R', 'G', 'B']) - set([s[i], s[j]]))
                if l[0] == 'R':
                    si+= rc[j+1]
                elif l[0] == 'G':
                    si += gc[j+1] 
                else:
                    si += bc[j+1]
print(si)

Submission status: Runtime Error

Solution code:
count=0
n=int(input())
l=list(map(str,input()))
i=0
while i<=n-3:
    j=i+1
    while i+1<=j and j<=n-2:
        if l[i]==l[j]:
            j+=1
        else:
            k=j+1
            while j+1<=k and k<=n-1 and k-j!=j-i:
                if l[i]!=l[j] and l[j]!=l[k]:
                    count+=1
                    k+=1
                else:
                    k+=1
            j+=1
    i+=1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
if N.count(7) >0:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
N=int(input())
S=str(input())
list_R=[]
list_G=[]
list_B=[]
count=0
for i in range(N):
    if S[i]=="R":
        list_R.append(i)
    if S[i]=="G":
        list_G.append(i)
    if S[i]=="B":
        list_B.append(i)
for i in range(N):
    for j in range(N):
        if i+2*j>N-1:
            break
        if S[i]!=S[i+j] and S[i+j]!=S[i+j*2] and S[i+2*j]!=S[i]:
            count=count+1

print(len(list_B)*len(list_G)*len(list_R)-count)

Submission status: Runtime Error

Solution code:
from collections import Counter
N=int(input())
S=[0]*5000
S=list(input())

S_count=Counter(S)
r=S_count["R"]
g=S_count["G"]
b=S_count["B"]

ans=0

for i in range(N-2):
    for j in range(1,N):
        if i+2*j>=N:
            break
        if S[i]!=S[i+j] and S[i+j]!=S[i+2*j] and S[i]!=S[i+2*j]:
            ans+=1

print(r*g*b-ans)

Submission status: Runtime Error

Solution code:
n=input()
if(n.index('7')>=0):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
s = list(input())

r = s.count('R')
g = s.count('G')
b = s.count('B')

# 1つ目の条件を満たす組の数
ans = r * g * b

# 2つ目の条件を満たす組の数
c = 0
for i in range(n):
    for j in range(i+1,n):
        k = 2 * j -i
        if k > n-1:
            break
        if s[i] != s[j] and s[j] != s[k] and s[k] != s[i]:
            c += 1

print(ans - c)

Submission status: Runtime Error

Solution code:
int main() {
	char s[3]
  	scanf("%s",s)
  	if(s[0]=="7" ||s[1]=="7"||s[2]=="7"){
    	printf("Yes")
    }
  	else{
    	printf("No")
    }
}

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())

num = [[0]*N for i in range(3)]
if S[N-1] == 'R':
    num[0][N-1] += 1
elif S[N-1] == 'G':
    num[1][N-1] += 1
else:
    num[2][N-1] += 1
    
for i in range(2,N+1):
    num[0][-i] = num[0][-i+1]
    num[1][-i] = num[1][-i+1]
    num[2][-i] = num[2][-i+1]
    if S[-i] == 'R':
        num[0][-i] += 1
    elif S[-i] == 'G':
        num[1][-i] += 1
    else:
        num[2][-i] += 1

ans = 0
for i in range(N-2):
    for j in range(i+1,N-1):
        if S[i] != S[j]:
            if S[i] != 'R' and S[j] != 'R':
                ans += num[0][j+1]
                if 2*j - i < N:
                    if S[2*j - i] == 'R':
                        ans -= 1
                        
            elif S[i] != 'G' and S[j] != 'G':
                ans += num[1][j+1]
                if 2*j - i < N:
                    if S[2*j - i] == 'G':
                        ans -= 1
                        
            elif S[i] != 'B' and S[j] != 'B':
                ans += num[2][j+1]
                if 2*j - i < N:
                    if S[2*j - i] == 'B':
                        ans -= 1
                    
print(int(ans))

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
RGB= list(input())

count = 0
sub = 0

def index_Multi(List):
    r_list = []
    g_list = []
    b_list = []
    for val in range(0,len(List)):
        if "R" == List[val]:
            r_list.append(val)
        elif "G" == List[val]:
            g_list.append(val)
        elif "B" == List[val]:
            b_list.append(val)
    return r_list, g_list, b_list
    
r_list, g_list ,b_list = index_Multi(RGB)

for index, a in enumerate(RGB):
    if a == "R":
        del g_list[0:len([i for i in g_list if i < index])]
        del b_list[0:len([i for i in b_list if i < index])]
        for g in g_list:
            for b in b_list:
                if g-index == b-g or b-index == g-b:
                    sub +=1
        count = count + len(g_list)*len(b_list)
                    
    elif a == "G":
        del b_list[0:len([i for i in b_list if i < index])]
        del r_list[0:len([i for i in r_list if i < index])]
        for b in b_list:
            for r in r_list:
                if b-index == r-b or r-index == b-r:
                    sub +=1
        count = count + len(b_list)*len(r_list)
                
    elif a == "B":
        del r_list[0:len([i for i in r_list if i < index])]
        del g_list[0:len([i for i in g_list if i < index])]
        for r in r_list:
            for g in g_list:
                if r-index == g-r or g-index == r-g:
                    sub +=1
        count = count + len(g_list)*len(r_list) 
        
print(count-sub)

Submission status: Runtime Error

Solution code:
N = int(input())
S = list(input())
f=0
ijk = list()
for i in range(N):
    for j in range(N):
        for k in range(N):
            if(k>j>i):
                if(k == j+(j-i)):
                    pass
                elif(i == j-(j-k)):
                    pass
                else:
                    ijk.append([i+1,j+1,k+1])
# print(S)
# print(ijk)

for i in range(len(ijk)):
    if(S[ijk[i][0]-1]== S[ijk[i][1]-1]):pass
    elif(S[ijk[i][0]-1]== S[ijk[i][2]-1]):pass
    elif(S[ijk[i][1]-1]== S[ijk[i][2]-1]):pass
    else:f+=1
print(f)