Problem:


Score : 100 points

Problem Statement

You will turn on the air conditioner if, and only if, the temperature of the room is 30 degrees Celsius or above.

The current temperature of the room is X degrees Celsius. Will you turn on the air conditioner?

Constraints

-40 \leq X \leq 40

X is an integer.

Input

Input is given from Standard Input in the following format:

X

Output

Print Yes if you will turn on the air conditioner; print No otherwise.

Sample Input 1

25

Sample Output 1

No

Sample Input 2

30

Sample Output 2

Yes



Sample input:
25


Sample output:
No

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): #xは64bit整数
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f
class BIT():#添字は1から始まることに注意
    def __init__(self, max_n):
        self.size = max_n + 1
        self.tree = [0] * self.size
        self.depth = self.size.bit_length()
        self.tot=0
        
    def initialize(self,seq):
        tree = self.tree
        size = self.size
        self.tot=0
        for i,x in enumerate(seq,1):
            self.tot+=x
            tree[i] += x
            j = i+(i&(-i))
            if j < size:
                tree[j] += tree[i]
        
    def __repr__(self):
        return self.tree.__repr__()
        
    def sum(self,i):
        tree = self.tree
        s = 0
        while i:
            s += tree[i]
            i -= i & -i
        return s
 
    def add(self, i, val):
        tree = self.tree
        size = self.size
        while i < size:
            tree[i] += val
            i += i & -i
        self.tot+=val
    
    def find(self,k):#k番目（最小は１）の要素,使うときは数列のサイズとbitのサイズを合わせること
        if k>self.tot: return self.size
        tree = self.tree; size = self.size
        x,sx = 0,0
        dx = 1 << (self.depth)
        for i in range(self.depth - 1, -1, -1):
            dx = (1 << i)
            if x + dx >= size:
                continue
            y = x + dx
            sy = sx + tree[y]
            if sy < k:
                x,sx = y,sy
        return x + 1


def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    N, Q = map(int, input().split())
    cs = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = list(tuple(map(int, input().split())) for i in range(Q)) #改行行列

    bit=BIT(N)
    inds=sorted(range(Q), key=lambda k: S[k][1])
    cr=0
    la=[-1]*N
    ans=[0]*Q
    for i in inds:
        l,r=S[i]
        while cr<r:
            cr+=1
            c=cs[cr-1]
            old=la[c-1]
            if old!=-1:
                #printe(old)
                bit.add(old,-1)
            la[c-1]=cr
            bit.add(cr,1)
        if l>1:
            tot=bit.sum(r)-bit.sum(l-1)
        else:
            tot=bit.sum(r)
        ans[i]=tot
    printl(ans)







if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
X = input()

if X >= 30:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
if X >= 30:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
if X>= 30:
    print('yes')
else:
    print('no')

Submission status: Runtime Error

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

if(X>=30):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
X=int(input('X: ')
-40<=X<=40
if X<=30:
      print('Yes')
else:
      print('No')

Submission status: Runtime Error

Solution code:
X = input()
if X >=30:
  print("Yes")
else :
  print("No")

Submission status: Runtime Error

Solution code:
x = int()
if x >= 30:
  print("yes")
  else
  print("no")

Submission status: Runtime Error

Solution code:
x = int(input())
if X>=30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N,D = map(int , input().split()) #第二引数(この場合だと---)を第一引数に変換(この場合だとint型)に変換する
ans = 0

for i in N :
    x,y = map(int , input().split())
    if x**2 + y**2 <= D**2:
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
a = int(intput())
if a >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
return 'Yes' if int(input()) >= 30 else 'No'

Submission status: Runtime Error

Solution code:
if input() > 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
temparr = input()
temparr = temparr.split()
n = int(temparr[0])
k = int(temparr[1])
temparr = input()
import math
temparr = temparr.split()
arr = []
for i in temparr:
    arr.append(int(i))
arr = sorted(arr)
#print(arr)

left = 1
right = arr[-1] + 1
ans = arr[-1]
while left <= right:
    mid = (left + right) // 2 
    count = 0 
    for i in arr :
        if i <= mid:
            continue 
        else:
            count += math.ceil(i / mid) - 1 
    if count <= k :
        right = mid - 1 
        if mid < ans:
            ans = mid 
    else:
        left = mid + 1 
print(ans)

Submission status: Runtime Error

Solution code:
def main():
    import sys
    input = sys.stdin.buffer.readline
    N, Q = map(int, input().split())
    *C, = map(int, input().split())

    last = [-1]*(N+1)
    P = []
    for i, c in enumerate(C):
        if last[c] != -1:
            P.append((last[c], i+1))
        last[c] = i+1

    queries = []
    for i in range(Q):
        l, r = map(int, input().split())
        queries.append((l, r, i))

    P.sort()
    queries.sort(reverse=True)

    class BIT():
        def __init__(self, n, x=1):
            self.n = n
            self.T = [0]*(n+1)

        def add(self, i, x):
            while i <= self.n:
                self.T[i] += x
                i += i & -i

        def sum(self, i):
            ret = 0
            while i:
                ret += self.T[i]
                i -= i & -i
            return ret

    bit = BIT(N)
    ans = [0]*Q
    for l, r, i in queries:
        while P and P[-1][0] >= l:
            cl, cr = P.pop()
            bit.add(cr, 1)
        ans[i] = r-l+1-bit.sum(r)

    print('\n'.join(map(str, ans)))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
N,K=map(int,input().split())
A=list(map(int,input().split()))
def check(x):
  if x==0:
    return 0
  else:
    t=0
    for i in range(N):
      t+=math.ceil(A[i]/x)-1
    if t<=K:
      return 10
    else:
      return 0
low=1
high=max(A)
sig=(low+high)//2
while True:
  if check(sig)==10:
    if check(sig-1)==0:
      ans=sig
      break
    else:
      high=sig-1
      sig=(low+high)//2
  else:
    low=sig+1
    sig=(high+low)//2
print(ans)

Submission status: Runtime Error

Solution code:
import math
N,K=map(int,input().split())
A=list(map(int,input().split()))
def check(x):
  if x==0:
    return 0
  else:
    t=0
    for i in range(N):
      t+=math.ceil(A[i]/x)-1
    if t<=K:
      return 10
    else:
      return 0
low=0
high=max(A)
sig=(low+high)//2
while True:
  if check(sig)==10:
    if check(sig-1)==0:
      ans=sig
      break
    else:
      high=sig-1
      sig=(low+high)//2
  else:
    low=sig+1
    sig=(high+low)//2
print(ans)

Submission status: Runtime Error

Solution code:
import math
N,K=map(int,input().split())
A=list(map(int,input().split()))
def check(x):
  if x==0:
    return 0
  else:
    t=0
    for i in range(N):
      t+=math.ceil(A[i]/x)-1
    if t<=K:
      return 10
    else:
      return 0
low=0
high=max(A)
sig=(low+high)//2
while True:
  if check(sig)==10:
    if check(sig-1)==0:
      ans=sig
      break
    else:
      high=sig-1
      sig=(low+high)//2
  else:
    low=sig+1
    sig=(high+low)//2
print(ans)

Submission status: Runtime Error

Solution code:
if X>=30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
x = int(input)
if x>=30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
K = int(input())
m = 0
for i in range(K):
    m = (m * 10 + 7) % K
    if m == 0:
        print(i)
        break
    elif m == k-1:
        print(-1)
        break

Submission status: Runtime Error

Solution code:
X = input()

if X>=30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
input(X)

if X>=30:
  print('Yes')
else:
  print('No")

Submission status: Runtime Error

Solution code:
if X>= 30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
int x = int(input())
if x >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
int x = int(input())
if x >= 30:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
#ABC174A


X = int(input())

if X >= 30:
    peint('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
tem = input()
if tem >= 30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import math

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

floor = 0
ceil = max(a)


def cut(long, logs):
    cnt = 0
    for i in logs:
        cnt += math.ceil(i / long) - 1
    return cnt


while ceil - floor > 1:
    L = (ceil + floor)//2
    num = cut(L, a)
    if num <= k:
        ceil = L
    else:
        floor = L

print(ceil)

Submission status: Runtime Error

Solution code:
if int(input())>29:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
int(input())

if X >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
int(input(X))

if X >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
int(input())
-40 <= X <= 40
if X >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
X=input()
if X<30:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
from math imort*
m,n=input.split()
c=0
for i in range(int(m)):
  a,b=input.split()
  d=(int(a)**2)+(int(b)**2)
  if d>=int(n):
    c=c+1
print(c)

Submission status: Runtime Error

Solution code:
n=int(input)
if n<30:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
n = int(input())
if n >= 30:
  l = 'Yes'
 else:
  l = 'No'
 print(l)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
n,k=map(int,input().split())
a=list(map(int,input().split()))
ok=10**10
ng=1
for i in range(40):
    chk=(ok+ng)//2
    cnt=0
    for j in range(n):
        cnt+=(a[j]+chk-1)//chk-1
    if cnt > k:
        ng = chk
    else:
        ok = chk
print(ok)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
  temp = input()

  if temp >= 30:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:


if __name__ == '__main__':
  temp = input()

  if temp >= 30:
      print("Yes")
  else:
      print("No")

Submission status: Runtime Error

Solution code:

if __name__ == "__main__":
  temp = input()

  if temp >= 30:
      print("Yes")
  else:
      print("No")

Submission status: Runtime Error

Solution code:

temp = input()

if temp >= 30:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:

temp = input()

if temp >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:

temp = input()

if temp >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

def lte_k(x, len_list):
    counter = 0
    for item in len_list:
        counter += math.ceil(item / x) - 1
    return counter <= k

def binary_search():
    low = 0
    high = max(a)

    while low < high-1:
        mid = (low + high) // 2
        guess = lte_k(mid, a)
        if guess:
            high = mid
        else:
            low = mid
    return high

print(binary_search())

Submission status: Runtime Error

Solution code:
N,D = int(input().split())
count=0
for _ in range(N):
  p,q=int(input().split())
  if (p*p + q*q)<=D*D:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
N,D = int(input().split(" "))
count=0
for _ in range(N):
  p,q=int(input().split(" "))
  if (p*p + q*q)<=D*D:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
N,D = map(int,input().split(" "))
count=0
for _ in range(N):
  p,q=map(int,input().split(" "))
  if (p*p + q*q)<=D*D:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
import math
N,D = map(int,input().split(" "))
count=0
for _ in range(N):
  p,q=map(int,input().split(" "))
  if (p*p + q*q)<=D*D:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:

N,D = map(int,input().split(" "))
 
for _ in range(N):
  count=0
  p,q=map(int,input().split(" "))
  if (p**2 + q**2) <=D**2:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
import math
N,D = map(int,input().split(" "))
 
for _ in range(N):
  count=0
  p,q=map(int,input().split(" "))
  if (p**2 + q**2)**0.5 <=D**2:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
N,D = map(int,input().split())
 
for _ in range(N):
  count=0
  p,q=map(int,input().split())
  if (p**2 + q**2)**0.5 <=D:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
if X>=30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <deque>
#include <set>
#include <iomanip>
#include <utility>
typedef long long ll;
typedef long double ld;
using namespace std;

int main() {
	int X;
	cin >> X;
	cout << (X>=30 ? "Yes": "No") << endl;
	return 0;
}

Submission status: Runtime Error

Solution code:
input = X
if X >= 30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
input = int(X)
if X >= 30:
  return 'Yes'
else:
  return 'No'

Submission status: Runtime Error

Solution code:
input X as int
if X >= 30:
  return 'Yes'
else:
  return'No'

Submission status: Runtime Error

Solution code:
x=int(input())
if x>=30 : 
  print('Yes')   
else : 
  pt('No')

Submission status: Runtime Error

Solution code:
x=int(input())
if x>=30 : 
  put('Yes')
else :
  put('No')

Submission status: Runtime Error

Solution code:
x=int(input())
if x>=30 :  
  put('Yes')   
else :    
  put('No')

Submission status: Runtime Error

Solution code:
x=input()
if x>=30 :
  put('Yes') 
else :  
  put('No')

Submission status: Runtime Error

Solution code:
x=input()
if x>=30 :
　　put('Yes')
  else :
    put('No')

Submission status: Runtime Error

Solution code:
n, q = map(int, input().split())
cn = list(map(int, input().split()))
s = [-1]*(n+1)
t = [0]*n
for i in range(n):
    j = cn[i]
    if s[j] == -1:
        t[i] = -1
        s[j] = i
    else:
        t[i] = s[j]
        s[j] = i

ans = [0]*q
for i in range(q):
    count = 0
    l, r = map(int, input().split())
    for j in range(l-1,r):
        if t[j] >= l-1:
            count += 1
    ans[i] = r-l+1-count

for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
import os
import sys
from io import BytesIO, IOBase
from math import ceil

def possible(logs, k, ans):
    for l in logs:
        k -= ceil(l/ans) - 1
    return k>=0


def main():
    n, k = map(int, input().split())
    logs = list(map(int, input().split()))

    l = 1
    r = max(logs) + 1

    while l < r:
        mid = (l + r)//2
        if possible(logs, k, mid):
            r = mid
        else:
            l = mid + 1
    print(l)




        




































# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
#

import sys
from math import ceil
input=sys.stdin.readline

def main():
    N,K=map(int,input().split())
    A=list(map(int,input().split()))
    sumA=sum(A)
    K_i=[int(A[i]/sumA*(K+N)-1) for i in range(N)]
    dA=[A[i]/(K_i[i]+1) for i in range(N)]
    res=K-sum(K_i)
    b=[]
    for i in range(N):
        b.append([dA[i],i])
    b.sort(reverse=True)
    now=0
    for i in range(res):
        K_i[b[now][1]]+=1
        dA[b[now][1]]=A[b[now][1]]/(K_i[b[now][1]]+1)
        if dA[b[now][1]]<b[now+1][0]:
            now+=1
    
    maxi=dA.index(max(dA))
    print(ceil(A[maxi]/(K_i[maxi]+1)))
    
    
    
if __name__=="__main__":
    main()

Submission status: Runtime Error

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

ans = n
for i in range(n+1):
    a = c[:i].count("W")
    b = c[i:].count("R")
    ans = min(ans,max(a,b))

print(ans)

Submission status: Runtime Error

Solution code:
n = input()
if n >= 30:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

stone = input()

count = 0
w = n-1
r = 0

for k in range(n):
    for i in range(n):
        if stone[i] == "W":
            w = i
            break

    for i in range(n):
        if stone[n-1-i] == "R":
            r = n-1-i
            break
    #print (w,r,count)
    if w < r:
        stone=stone[:w] + "R" +stone[w+1:r]+ "W" +stone[r+1:]  
        count += 1
        #print(stone)
        
    else:
        break
print (count)

Submission status: Runtime Error

Solution code:
k=int(input())


init=7
for i in range(k+1):
  if init%k ==0:
    print(i+1)
    break
  t = t*10+7
print(-1)

Submission status: Runtime Error

Solution code:
print((int(input())>=30 ? "Yes" : "No"))

Submission status: Runtime Error

Solution code:
t = int(input)
print("Yes" if t >= 30 else "No")

Submission status: Runtime Error

Solution code:
t = int(input())
print "Yes" if t >= 30 else "No"

Submission status: Runtime Error

Solution code:
x = input()
if(x >= 30):
  print('Yes')
  else:
        print('No')

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
arr = list(map(int,input().split()))
denominator = sum(arr)

import copy
value = copy.deepcopy(arr)
piece = [1 for i in range(N)]
left = K+N-sum(piece)
for i in range(left):
    j = value.index(max(value))
    piece[j] += 1
    value[j] = arr[j]/piece[j]

import math
print(round(round(max(value)*10)/10))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
countW = S.count('W')
if countW==0:
	print(0)
	exit()
if countW==N:
	print(0)
	exit()
leftW = S[:countW].count('W')
rightR = S[countW:].count('R')
print(max(leftW, rightR))

Submission status: Runtime Error

Solution code:
import math
N, K=map(int, input().split())
A=list(map(int, input().split()))
i=1
j=10**9
while True:
    k=(i+j)//2
    if k>0 and sum([math.ceil(a/k)-1 for a in A])<=K:
        if k-1>0 and sum([math.ceil(a/(k-1))-1 for a in A])>K:
            print(k)
            break
        else:
            j=k-1
    else:
        i=k+1

Submission status: Runtime Error

Solution code:
if int(input()) > 30 print('Yes') else print('No')

Submission status: Runtime Error

Solution code:
import sys
a = int(sys.stdin)
if a >= 30:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
if input() >= 30:
  print("Yes")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
import sys
import math
n,k = map(int,input().split())
a = list(map(int,input().split()))
if k ==0:
  print(max(a))
  sys.exit()
def check(t):
  ans = 0
  if t==0:
    return False
  for aa in a:
    if aa > t:
      ans += aa//t
  return ans <= k
max = 10**9+1
min = 0
while max-min>1:
  mid = (max+min)//2
  if check(mid):
    max = mid
  else:
    min = mid
print(math.ceil(max))

Submission status: Runtime Error

Solution code:
N=input()
c=input()
print(c[:c.count('R')].count('W'))

Submission status: Runtime Error

Solution code:
import sys
import math
n,k = map(int,input().split())
a = list(map(int,input().split()))
if k ==0:
  print(max(a))
  sys.exit()
def check(t):
  ans = 0
  for aa in a:
    if aa > t:
      ans += aa//t
  if ans > k:
    return False
  else:
    return True
max = 10**9
min = 0
while max-min>1:
  mid = (max+min)/2
  if check(mid):
    max = mid
  else:
    min = mid
print(math.ceil(max))

Submission status: Runtime Error

Solution code:
x=int(iput())
if x>=30:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
    X = int(input())
    if X > 30:
      print("Yes")
    else:
      print("No")

Submission status: Runtime Error

Solution code:
input()
s = input()

def find_cost(s):
    counter, i, j = 0, 0, len(s)-1
    while i < j:
        while i < len(s) and s[i] != 'W':
                i += 1
        while j >= 0 and s[j] != 'R':
                j -= 1
        if i < j:
            s[i], s[j] = s[j], s[i]
            counter += 1
        i += 1
        j -= 1
    for i in range(0, len(s) - 2):
        if s[i] == 'W' and s[i + 1] == 'R':
            counter += 1
    print(counter)
s = list(s)
find_cost(s)

Submission status: Runtime Error

Solution code:
x = int(input())
return "Yes" if x >= 30 else "No"

Submission status: Runtime Error

Solution code:
n = int(input())
c = list(input())
cFixed = [x for x in c]
cFixed.sort()
lastR = -1
for i in range(n):
	if cFixed[i] == "R":
		lastR = i
ans = 0
for i in range(lastR+1):
	if c[i] == "W":
		ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
if N>=30:
  print("YES")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
X = int(input())
if X > 30:
  print("Yes")
 else:
   print("No")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def main():
    K = int(input())
    # = "7"*999982
    #print(int(t)%999983)

    if K%2 == 0 or K%5 == 0:
        print(-1)
    else:
        f = len(factorization(K))
        i = 0
        while(20000>i):
            i+=1
            if 7 * (10**i-1)//9 %K == 0:
                print(i)
                return
        if f > 2:
            print(-1)
        else:
            print(K-1)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from functools import lru_cache, cmp_to_key
from collections import defaultdict as dd, deque, Counter as C
from bisect import bisect_left as bl, bisect_right as br, bisect
from heapq import heapify, heappop, heappush
# from math import sqrt
from math import ceil, log, floor
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var, end="\n"): sys.stdout.write(str(var)+end)
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, k = sp()
arr = L()
low, high = 1, max(arr)
answer = max(arr)
while low <= high:
    mid = (low + high) >> 1
    req = 0
    for i in range(n):
        if arr[i] <= mid:
            continue
        else:
            temp = arr[i] // mid
            req += temp
    if req <= k:
        answer = min(answer, mid)
        high = mid - 1
    else:
        low = mid + 1
out(answer)

Submission status: Runtime Error

Solution code:
n = int(input())
c = list(input())
cFixed = [x for x in c]
cFixed.sort()
for i in range(n):
	if cFixed[i] == "R":
		lastR = i
ans = 0
for i in range(lastR+1):
	if c[i] == "W":
		ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n,q = map(int,input().split())
c = list(map(int,input().split()))
lr= [input().split() for _ in range(q)]
for i in range(q):
    print(len(set(c[int(lr[i][0])-1:int(lr[i][1])])))

Submission status: Runtime Error

Solution code:
if X>=30:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res
 
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
def pow_k(x, n):
 
    if n == 0:
        return 1
 
    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x
        x *= x
        n //= 2
 
    return K * x
def main():  #startline-------------------------------------------
    n = int(input())
    s = input()
    print(s[:n//2+1].count("W"))
        
                
if __name__ == "__main__":
    main() #endline===============================================