top of page

소스 코드 제출

공개·회원 52명

20250424

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

# a.pop(a.index(max(a)))

# print(max(a)*min(a))

# n=int(input())

# for i in range(n):

# p,m=map(int,input().split())

# a=[0 for i in range(m)]

# s=0

# for j in range(p):

# k=int(input())

# if a[k-1]==1:

# s=s+1

# a[k-1]=1

# print(s)

# def dp(x):

# global a

# if x==1:

# return 1

# elif x==2:

# return 2

# elif a[x]==0:

# a[x]=dp(x-2)+dp(x-1)

# return a[x]

# n=int(input())

# a=[0 for i in range(n+1)]

# print(dp(n)%10007)

def bs():

global n,m,s

l=0

r=n

while l<r:

c=l+(r-l)//2

d=m+c

if s==int(d/(n+c)*100//1):

l=c+1

else:

r=c-1

print(l,c,r)

print(d/(n+c)*100//1)

if s==int(d/(n+c)*100//1):

return c+1

else:

return c

n,m=map(int,input().split())

s=int(m/n*100//1)

ans=bs()

if ans==n+1:

ans=-1

print(ans)

1회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page