Problem:


Score : 100 points

Problem Statement

Takahashi is meeting up with Aoki.

They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.

Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.

Will he arrive in time?

Constraints

1 \leq D \leq 10000

1 \leq T \leq 10000

1 \leq S \leq 10000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

D T S

Output

If Takahashi will reach the place in time, print Yes; otherwise, print No.

Sample Input 1

1000 15 80

Sample Output 1

Yes

It takes 12.5 minutes to go 1000 meters to the place at a speed of 80 meters per minute. They have planned to meet in 15 minutes so he will arrive in time.

Sample Input 2

2000 20 100

Sample Output 2

Yes

It takes 20 minutes to go 2000 meters to the place at a speed of 100 meters per minute. They have planned to meet in 20 minutes so he will arrive just on time.

Sample Input 3

10000 1 1

Sample Output 3

No

He will be late.



Sample input:
1000 15 80


Sample output:
Yes

Submission status: Runtime Error

Solution code:
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
 
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
 
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
 
        if x == y:
            return
 
        if self.parents[x] > self.parents[y]:
            x, y = y, x
 
        self.parents[x] += self.parents[y]
        self.parents[y] = x
 
    def size(self, x):
        return -self.parents[self.find(x)]
 
    def same(self, x, y):
        return self.find(x) == self.find(y)
 
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
 
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
 
    def group_count(self):
        return len(self.roots())
 
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
 
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
 
nm = list(map(int, input().split()))
n = nm[0]
m = nm[1]
 
ans = 0
 
uf = UnionFind(n)
for i in range(m):
    friends = list(map(int, input().split()))
    uf.union(friends[0]-1,friends[1]-1)
    if ans < uf.size(friends[1]-1):
        ans = uf.size(friends[1]-1)
print(ans)

Submission status: Runtime Error

Solution code:
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

nm = list(map(int, input().split()))
n = nm[0]
m = nm[1]

ans = 1

uf = UnionFind(n)
for i in range(m):
    friends = list(map(int, input().split()))
    uf.union(friends[0]-1,friends[1]-1)
    if ans < uf.size(friends[0]-1):
        ans = uf.size(friends[0]-1)
print(ans)

Submission status: Runtime Error

Solution code:
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

nm = list(map(int, input().split()))
n = nm[0]
m = nm[1]

ans = 0

uf = UnionFind(n)
for i in range(m):
    friends = list(map(int, input().split()))
    uf.union(friends[0]-1,friends[1]-1)
    if ans < uf.size(friends[0]-1):
        ans = uf.size(friends[0]-1)
print(ans)

Submission status: Runtime Error

Solution code:
print("前提条件を入力して下さい")
D = int(input("高橋くんの家から待ち合わせ場所までの距離D[m]を入力して下さい"))
T = int(input("待ち合わせの時刻までの時間[min]を入力した下さい"))
S = int(input("高橋くんの移動する速さ[m/min]を入力して下さい"))
# input_data = [D, T, S]
# print(input_data)
if (D / S <= T):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

if t <= d/s:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S=input()
T=input()
match=0
for i in range(len(S)-len(T)):
    count=0
    for j in range(len(T)):
        if S[i+j]==T[j]:
            count=count+1
    if match<count:
        match=count
print(len(T)-match)

Submission status: Runtime Error

Solution code:
d,t,s = map(int,input().split())
if d <= t*s{
  print("Yes")
}
else{
  print("No")

}

Submission status: Runtime Error

Solution code:
S=input()
T=input()
i=0
j=0
match = 0
for i in Range(len(S)-len(T)):
  count = 0
  for j in Range(Len(T)):
    if S[i+j]==T[j]:
      count=count+1
  
  if match<count:
    match=count

print(Len(T)-match)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(s) for s in input().split()]

total=0

for i in range(n-1):
  for j in range(n-i-1):
    total=total+a[i]*a[i+j+1]%1000000007
    
print(total% 1000000007)

Submission status: Runtime Error

Solution code:
d, t, s = input().split()
if t*s >= d:
	print "Yes"
else:
	print "No"

Submission status: Runtime Error

Solution code:
d, t, s = input().split()
if t*s >= d:
	return "Yes"
else:
	return "No"

Submission status: Runtime Error

Solution code:
D,T,S = input().split(' ')
if D/S>T:
  print('No')
else
  print('Yes')

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
sum = 0
ans = 0
# for i in range(n):
#     a[i] = a[i] % (10**9 +7)
#
# s = 0

for i in range(n):
    sum += a[i]

for i in range(n-1):
    sum -= a[i]
    ans += a[i] * sum

print(ans % (10**9 + 7))

Submission status: Runtime Error

Solution code:
x, y, z = int(input().split())
if y*z>=x:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
D, T, S = map(int, input().split())
if D/T =< S:
	print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
input_data = input()
data = split(int(input_data))
d = data[0]
t = data[1]
s = data[2]
print("Yes") if d / s > t else print("No")

Submission status: Runtime Error

Solution code:
D = int(input())
T = int(input())
S = int(input())

if D > T*S:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
r = S * T
if r > D:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
int main(D, T, S):
  if D > T * S:
    print('Yes')
  else
  	print('No')

Submission status: Runtime Error

Solution code:
d,t,s = map(int, input().split())
if t <= d/s:
  print('Yes')
 else:
  print('No')

Submission status: Runtime Error

Solution code:
d,t,s=input().split()
if(s>=(d/t)):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
D,T,S = map(int,input.split())
if D/S <= T:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
D,T,S = map(int,input(),slpit())
if D/S <= T:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
D = input()
T = input()
S = input()

D = int(D)
T = int(T)
S = int(S)

if D/S <= T:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
N, M = map(int,input().split())
pairs = []
for i in [0]*M:
    inp = sorted(list(map(int,input().split())))
    if inp not in pairs:
        pairs.append(inp)
def solver(N,M,pairs):
    group_list = []
    max_len = 1
    for i in pairs:
        pair = sorted(i)
        for j in range(len(group_list)):
            if pair[1] in group_list[j]:
                break
            elif pair[0] in group_list[j]:
                group_list[j].append(pair[1])
                if max_len < len(group_list[j]):
                    max_len = len(group_list[j])
                break
        else:
            if max_len < 2:
                max_len = 2
            group_list.append(pair)
    return max_len
print(solver(N,M,pairs))

Submission status: Runtime Error

Solution code:
list1 = input().split(" ")
if int(list1[0]) <= int(list1[1]) * int(list[2]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
D = input('距離')
T = input('時間')
S = input('速度')
if D/S < T:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
D,T,S=[int(input()) for i in range(3)]
if D/S<=T:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
# Dは距離　Tは制限時間　速度はS
D = int(input())
T = int(input())
S = int(input())
if D > T * S:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
b = [int(i) for i in a]
if b[0] <= b[1] * b[2] :
  print("Yes")
 else:
  print("No")

Submission status: Runtime Error

Solution code:
D,T,S=int(input())
if 1<=D<=10000 and 1<=T<=10000 and 1<=S<=10000:
  if (D/S)>T:
    print("He will be late")
  else:
    print("Yes")

Submission status: Runtime Error

Solution code:
D,T,S=map(int,input().spltit())
if D>T*S:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
D, T, S = input().split()
sum = T * S
if D < sum
	return "Yes"
else
	return "No"

Submission status: Runtime Error

Solution code:
from math import ceil
d, t, s = map(int, input().split())
u, l = ceil(d/t), d//t
if u == l:
	if u <= s: print("Yes")
    else: print("No")
else:
    if d/t <= s: print("Yes")
    else:print("No")

Submission status: Runtime Error

Solution code:
put D

Submission status: Runtime Error

Solution code:
d = int(input())
t = int(input())
v = int(input())

if d/v > t: 
  print("No")
else:
	print("Yes")

Submission status: Runtime Error

Solution code:
D,T,S = map(input().split())
if D/S>=T:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
d,t,s = map(double, input().split())  
time = d/s
if time > t:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
D = int(input())
T = int(input())
S = int(input())

if D <= T * S:
    print("Yes")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
D,T,S = map(int, input().split())

Time = int(D/S)

if Time =< T:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
D,T,S = map(int, input().split())

Time = float(D/S)

if Time =< T:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
D = int(input())
S = int(input())
T = int(input())

if D/S <= T:
    return "Yes"
else:
    return "No"

Submission status: Runtime Error

Solution code:
if D/S <= T:
    return "Yes"
else:
    return "No"

Submission status: Runtime Error

Solution code:
x, y,z = map(int, input().split()) 
test = x / z

if (test < y){
    print('Yes')
}else{
    print('No')
}

Submission status: Runtime Error

Solution code:
d=input()
t=input()
s=input()

if d<=s*t:
  print("Yes")
else print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
mod=10**9+7
S=0
M=0
for i in A:
    S+=i
for i in A:
    S-=i
    M+=(S*i)%mod
print(M%mod)

Submission status: Runtime Error

Solution code:
s = input()
t = input()
S,T = len(s),len(t)

ans = T

for i in range(S-T+1):
    tmp = [c1!=c2 for c1,c2 in zip(s[i:i+T],t)].count(True)
    ans = min(ans,tmp)

print(ans)

Submission status: Runtime Error

Solution code:
from collections import Counter

class UnionFind:
    def __init__(self,num:int):
        self.r = [-1 for i in range(num)]
    def root(self,x:int):
        if(self.r[x] < 0):
            return x
        self.r[x] = self.root(self.r[x])
        return self.r[x]
    def unite(self,x:int,y:int):
        rx = self.root(x)
        ry = self.root(y)
        if(rx == ry):
            return False
        if(self.r[rx] > self.r[ry]):
            rx,ry = ry,rx
        self.r[rx] += self.r[ry]
        self.r[ry] = rx
        return True
    def size(self,x:int):
        return -self.r[self.root(x)]

N,M = map(int,input().split())
group = UnionFind(N)
for i in range(M):
    A,B = map(int,input().split())
    group.unite(A-1,B-1)
ans = 0
for i in range(N):
    ans = max(ans,group.size(i))
print(ans)

Submission status: Runtime Error

Solution code:
from collections import Counter

class UnionFind:
    def __init__(self,num:int):
        self.r = [-1 for i in range(num)]
    def root(self,x:int):
        if(self.r[x] < 0):
            return x
        self.r[x] = self.root(self.r[x])
        return self.r[x]
    def unite(self,x:int,y:int):
        rx = self.root(x)
        ry = self.root(y)
        if(rx == ry):
            return False
        if(self.r[rx] > self.r[ry]):
            rx,ry = ry,rx
        self.r[rx] += self.r[ry]
        self.r[ry] = rx
        return True
    def size(self,x:int):
        return -self.r[self.root(x)]

N,M = map(int,input().split())
group = UnionFind(N)
for i in range(M):
    A,B = map(int,input().split())
    group.unite(A-1,B-1)
ans = 0
for i in range(N):
    ans = max(ans,group.size(i))
print(group.r)
print(ans)

Submission status: Runtime Error

Solution code:
s = map(int, input().split())
d = s[0]
t = s[1]
s = s[2]
if d >= t * s:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
 D,T,S = map(int, input().split())
if (D/T > S):
  	print("No")
else:
	print("Yes")

Submission status: Runtime Error

Solution code:
D,T,S = map(int(), input().split())
if (D/T < S):
  	print("No")
else
	print("Yes")

Submission status: Runtime Error

Solution code:
x,y,z = input.split()
if (x/y >= z):
	print("Yes")
elif
	print("No")

Submission status: Runtime Error

Solution code:
x,y,z = input.split()
if (x/y <= z)
	print("Yes")
elif
	print("No")

Submission status: Runtime Error

Solution code:
x,y,z = input.split()
if (x/y >= z)
	print("Yes")
elif
	print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
 
if a <= b * c:
  	print("Yes")
else:
  	print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
 
if a <= b * c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
D = input() #distance
T = input() #time in minutes
S = input()#speed in metri al secondo
def res():
    if D*S <= T:
        print("Yes")
    else:
        print("No")

res()

Submission status: Runtime Error

Solution code:
D = input() #distance
T = input() #time in minutes
S = input()#speed in metri al secondo

if D*S <= T:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if a / c <= b:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if (a / c <= b):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if (a / c) <= b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if (a / b) <= c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if a / b <= c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if a / c <= b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spulit())
if a / c = b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split()))
if x[0] / x[2] <= x[3]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()

if a/c<b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
D, T, S = map(int, input().split())
time = float(D) / float(S)
if time <= T:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
D, T, S = map(int, input().split())
time = D / S 
if time <= T:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
d, t, s = map(int,input())
print('Yes' if t*s >=d else 'No')

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
mod = 10**9 + 7
ak = 0
ak_2 = 0

for i in range(N):
  ak += A[i]
  ak_2 += A[i] ** 2
s = int(((ak ** 2) - ak_2) // 2)
print(s % mod)

Submission status: Runtime Error

Solution code:
D = input("D")
T = input("T")
S = input("S")

def compare():
  if D > T * S:
    return "No"
  else:
    return "Yes"

Submission status: Runtime Error

Solution code:
num = list(map(int, input().split()))
time = num[0] / num[2]
if time <= num[1]:
  print("Yes")
  else:
    print("No")

Submission status: Runtime Error

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

time = list[0] / list [2]

if time <= list[1]:
  print("Yes")
 else:
  print("No)

Submission status: Runtime Error

Solution code:
d, s, t = [int(i) for i in input().split()]
if s * t >= d:
  	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
d,t,s=input().split()
if d/s<t :
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
D,T,S = (int(x) for x in input().split())

disable = D - T*S

if disable>0:
    print("No")
else 
    print("Yes")

Submission status: Runtime Error

Solution code:
time = int(D) / int(S)
if time <= int(T):
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
time = D / S
if time <= T:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

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

max = (10 ** 9) + 7

#入力配列の総和
line = 0
for i in range (n):
    line += a[i]

#a11, a22, ...対角線要素の総和
rem = 0
for i in range(n):
    rem += a[i]*a[i]

sum = ((line*line) - rem) // 2

ans = sum % max

print(ans)

Submission status: Runtime Error

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

mod = 1000000007


ans = 0
n = A[0]
for a in A[1:]:
    ans += a * n
    n += a

print(ans%mod)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env pypy3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import math,sys

n = int(sys.stdin.readline())
a = tuple(map(int,sys.stdin.readline().split()))
#n = int(input())
#a = list(map(int,input().split()))
g = math.gcd(a[0],a[1])
for i in range(2,n):
    g = math.gcd(g,a[i])
M = max(a)
acc = a[0]
for i in range(n):
    acc = math.gcd(acc,a[i])
if acc != 1:
    print("not coprime")
    exit()

LIMIT=max(a)
minPrime = [0]*(LIMIT+1)
minPrime[1] = 1
def make():
    for i in range(2,LIMIT+1):
        if minPrime[i] == 0:
            minPrime[i] = i
            #print(i)
            for j in range(i+i,LIMIT+1,i):
                #print(i,j)
                if minPrime[j] == 0:
                    minPrime[j] = i
make()
def factrial(N):
     ret = []
     while minPrime[N] != N:
         ret.append(minPrime[N])
         N = N//minPrime[N]
     if N != 1:
         ret.append(N)
     return ret

judge = set([])

for e in a:
    asf = set(factrial(e))
    if judge & asf != set():
        print("setwise coprime")
        exit()
    #judge |= asf
    judge = judge | asf #too slow
print("pairwise coprime")

Submission status: Runtime Error

Solution code:
d,t,s=list(map(int,input()))
if d <= (s*t):
  print("YES")
elif:
  print("NO")

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
import itertools
c = itertools.combinations(A, 2)
B=[]
a=0
for v in itertools.combinations(A, 2):
    c=v[0]*v[1]
    a=a+c
print(a%1000000007)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main() {
    //入力を受け取る
    int D, T, S;
    cin >> D >> T >> S;

    //高橋君の移動時間を計算する
    double time = (double)D / S;

    //Tとtimeの大小関係に応じて出力をする
    if (T >= time) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}

Submission status: Runtime Error

Solution code:

n,m=map(int,input().split())
root=[-1]*n
def r(x):
    if root[x]<0:
        return x
    else:
        root[x]=r(root[x])
        return root[x]
def unite(x,y):
    x=r(x)
    y=r(y)
    if x==y:
        return
    root[x]+=root[y]
    root[y]=x
def size(x):
    x=r(x)
    return -root[x]
for i in range(m):
    x,y=map(int,input().split())
    x-=1
    y-=1
    unite(x,y)
ans=0
for i in range(n):
    ans=max(ans,size(i))
print(ans)

Submission status: Runtime Error

Solution code:
d,t.s = map(int,input().split())
a = d/s
if t>=a:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
    d, t, s = list(map(int, input().split()))
    if d / t <= s:
      print('Yes')
    else:
      print('No')

Submission status: Runtime Error

Solution code:
d, t, s = list(map, int(input().split()))
if d / t <= s:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
D, T, S = map(int. input().split())
if D/S <= T:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import itertools

if __name__ == "__main__":
  n = int(input())
  li = list(map(int, input().split()))
  array = list(itertools.combinations(li, 2))
  sum = 0
  for i in range(n):
    sum += array[i][0] * array[i][1]
  print(sum)

Submission status: Runtime Error

Solution code:
d, t, s = map(int, input().split())
if d/s > t:
  pirnt("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(input().split(' '))
total=0
S_i=0
for i in range(n-1):
    S_i+=int(a[n-1-i])
    S_i=S_i%(7+10**9)
    total+=S_i*int(a[n-2-i])
    total=total%(7+10**9)
print(total)

Submission status: Runtime Error

Solution code:
s = int(input().split())
if (s[0]/s[2])>s[1]:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
s = int(input().split())
if s[0]/s[2]>s[1]:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
s = input().split()
if s[0]/s[2]>s[1]:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
t = input()
m = len(s)
n = len(t)
did = m -n
li = []
for i in range(did+1):
  su = 0
  for j in range(n):
    if t[j] ==s[i+j]:
      su +=0
    else:
      su +=1
  li.append(su)
print(min(li))

Submission status: Runtime Error

Solution code:
d ,t,s = map(int.input().split())
if d/s > t:
  print(No)
else:
  print(Yes)

Submission status: Runtime Error

Solution code:
from math import gcd
import numpy as np

def setwise_coprime_check_fun(A_list, N):
    gcd_all = A_list[0]
    for i in range(N - 1):
        gcd_all = gcd(gcd_all, A_list[i + 1])
        if gcd_all == 1:
            break
    return gcd_all

def preprocess_fun(A_max):
    p_flg = [True] * (A_max + 1)
    D = [0] * (A_max + 1)
    p_flg[0] = False
    p_flg[1] = False
    for i in range(2, A_max + 1, 1):
        if p_flg[i]:
            for j in range(i, A_max + 1, i):
                p_flg[j] = False
                D[j] = i
    return D

def pairwise_coprime_check(A_list, D):
    p_count = [0] * (max(A_list) + 1)
    for A in A_list:
        temp = A
        d = 0
        while temp != 1:
            if p_count[D[temp]] == 1 and d != D[temp]:
                return 0
            p_count[D[temp]] = 1
            d = D[temp]
            temp = temp // D[temp]
    return 1

## 標準入力
N = int(input())
A_list = list(map(int, input().split(" ")))

# 整数の最大値を取得
A_max = max(A_list)

# 本体
if(setwise_coprime_check_fun(A_list, N) != 1):
    print("not coprime")
else:
    D = preprocess_fun(A_max)
    if pairwise_coprime_check(A_list, D) == 1:
        print("pairwise coprime")
    else:
        print("setwise coprime")

Submission status: Runtime Error

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

import sys
import math
def setwise_coprime(a):
  ans=a[0]
  for i in range(1,n):
    ans=math.gcd(ans,a[i])
  return ans

#エラストテネスのふるい
def create_sieve(n):
  sieve=[0]*(n+1)
  for i in range(2,n+1):
    if sieve[i]==0:
      for j in range(i*i,n+1,i):
        sieve[j]=i
  return sieve

#高速素因数分解
def fast_factorization(n, sieve):
  prime={}
  while n>1:
    p=sieve[n]
    #nが素数の場合
    if p==0:
      prime[n]=prime.get(n,0)+1
      break
    #nが素数ではない場合
    else:
      prime[p]=prime.get(p,0)+1
      n=n//p
  return prime

check=set()
if setwise_coprime(a)==1:
  #素因数のダブリをcheck
  sieve=create_sieve(10**6)
  for i in range(n):
    if a[i]!=1:
      s=fast_factorization(a[i], sieve)
      for i in s:
        if i in check:
          print("setwise coprime")
          sys.exit()
        else:
          check.add(i)
  print("pairwise coprime")    
else:
  print("not coprime")

Submission status: Runtime Error

Solution code:
d,t,s=map(int, input().split())
if d/t <= s:
  print("Yes")
else:
  prinst("No")

Submission status: Runtime Error

Solution code:
INF = 10 ** 9 + 7
N = int(input())
A = list(map(int, input().split()))
S = [sum(A)]#A[0]~A[N-1]の総和を求める

ans = 0
for i in range(N):
    key = S[-1]#Sの一番後ろの配列をとる(要素は一つしかない)
    S.append(key - A[i])#総和からA[i]を引いてあげたものをS配列に加えてあげるS配列はみぎに行くにつれて値が小さくなる
    #print(S)
    ans += (A[i] * S[-1])#Ansは実際の総和計算に当たるもの

print(ans % INF)

Submission status: Runtime Error

Solution code:
S =input()
T =input()
min_count　=　10000

for i in range(len(S)-len(T)+1):
    count = 0
    for j in range(len(T)):
        if T[i+j] != S[j]:
            count += 1
        min_count =min(count,min_count)
        if min_count = 0:
            print(min_count)
            break

print(min_count)

Submission status: Runtime Error

Solution code:
# union-find
# https://note.nkmk.me/python-union-find/

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
        # 各要素の親要素を格納する

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            return self.find(self.parents[x])
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
        return
    
    def size(self, x):
        x = self.find(x)    
        return self.parents[x]*(-1)

def main():
    n, m = map(int, input().split())
    friend = UnionFind(n)

    for _ in range(m):
        a, b = map(int, input().split())
        friend.union(a-1, b-1)
    
    ans = 0
    for i in range(n):
        ans = max(ans, friend.size(i))
    print(ans)

if  __name__ == "__main__":
     main()

Submission status: Runtime Error

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

mod = 10 ** 9 + 7
total = 0
y = sum(list1)

for i in range(0,n-1):
    x = y- sum(list1[:i+1])
    total += list1[i] * x % mod

total = total % mod
print(total)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
s = sum(a)
ans = 0 
for i in range(n-1):
	s-=a[i]
	ans+=s*a[i]
print(ans%(10**9+7))

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int ,input().split()))
MOD = 10**9+7

sum = 0
for i in range (N):
    sum += A[i]

ans = 0
for i in range(N):
    sum -= A[i]
    ans += (A[i] * sum) % MOD

ans = ans % MOD
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
A = input().split(' ')
a = 0
sum = 0
for i in range(1, N):
    sum += int(A[i])
for i in range(N):
    a += int(A[i]) *  sum
    if i < N - 1:
        sum -= int(A[i + 1])
    
print(int(a % (1e9 + 7)))

Submission status: Runtime Error

Solution code:
D,T,S = input().split()

if S*T >= D:
  print("Yes")
else:
  print("No")