TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) =< int(K):
 print(S)
else:
 print(S[0:K]+'...')


K = int(input())
S = input()
if len(S) =< K:
 print(S)
else:
 print(S[:K+1] + '...')

K = int(input())
S = input()
if len(S) =< K:
 print(S)
else:
 print(S[:K+1]+'...')


K = int(input())
S = input()

if len(S) =< int(K):
 print(S)
else:
 print(S[1:K+1])


K = int(input())
S = input()
if len(S) =< int(K):
 print(S)
else:
 print(S[:int(K)+1]+'...')


K = int(input())
S = input()
if len(S) <= K:
 print(S)
else:
 print(S[:K+1] + '...')

K = int(input())
S = input()
if len(S) =< int(K):
 print(S)
else:
 print(S[:int(K)]+'...')


K = int(input())
S = input()

if len(S) =< K:
 print(S)
else:
 print(S[1:K+1]+'...')


K = int(input())
S = input()
if len(S) =< K:
 print(S)
else:
 print(S[:K+1]+'...')


K = int(input())
S = input()

if len(S) =< K:
 print(S)
else:
 print(S[1:K+1])

K = int(input())
S = input()
if len(S) <= K:
 print(S)
else:
 print(S[:K] + '...')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = list(input())

if (len(S) <= K):
	print(''.join(S))
else:
	string = S[0:K+1]
	print(''.join(string) + '...')

K = int(input())
S = list(input())

if (len(S) <= K):
	print(''.join(S))
else:
	string = S[0:K]
	print(''.join(string) + '...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
def cal():

    num = int(input())
    if num >= 10:
        ben = num % 10
    else:
        ben = num
    
    if ben == 3:
        print("bon")
    elif ben == 0 or ben == 1 or ben == 6 or ben == 8:
        print("pon")
    elif ben == 2 or ben == 4 or ben == 5 or ben == 7 or ben == 9:
        print("hon")
    


cal()

def cal():
    k = int(input())
    string = input()
    if len(string) <= k:
        print(string)
    else:
        list1 = list(string)
        for i in range(k):
            print(list1[i], end='')
        print("...")

cal()

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S=input()
K=input()
if l>=int(S):
    print(K[:1]+'...')
else:
    print(K)

S=int(input())
K=input()
k=len(K)

if k>S:
    print(K[:S]+'...')
else:
    print(K)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  S = S[0:K+1]
  print(S+'...')

K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  S = S[0:K]
  print(S+'...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
import numpy,math

n = int(input())
s = str(input())

if(len(s) <= n):
    print(s)
else:
    print(s[:n+1 + "..."])

import numpy,math

n = int(input())
s = str(input())

if(len(s) <= n):
    print(s)
else:
    print(s[:n] + "...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S = input()
K = int(input())

if len(S) > K:
    print(S[0:K] + "...")
else:
    print(S)

K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[0:K] + '...')

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S = input()
K = int(input())

if len(S) <= K:
    print(S)
else:
    s = S[0:K]
    s1 = s + '...'
    print(s1)

K = int(input())
S = input()


if len(S) <= K:
    print(S)
else:
    s = S[0:K]
    s1 = s + '...'
    print(s1)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
l = len(s)
if l < k + 1:
    print(s)
else:
    print(s[:k],"...")

k = int(input())
s = input()
l = len(s)
if l < k + 1:
    print(s)
else:
    print(s[:k]+"...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s  = input()

if  len(s)<=k:
 print(s)
else:
print(s[:k]+'...')


k = int(input())
s  = input()
if  len(s)<=k:
 print(s)
else:
 print(s[:k]+'...')

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    print(s if len(s) <= k else print(s + "...")) 

import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    print(s if len(s) <= k else print(s[:k] + "...")) 

import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    str =  s[:k] + "..."
    print(s if len(s) <= k else str)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
i = int(input())
s = input()
print(s[0:k-1] if len(s) > k else s)


k = int(input())
s = input()
print(s[0:k] + "..." if len(s) > k else s)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if s <= k :
print(s)

else s >= k :
print(s[:k]+'...')

K = int(input())
S = input()

if len(S) < K:
    print(s)
else:
    print(s[:k] + "...")

k = int(input())
s = str(input())

if k >= len(s):
  print(s)
else:
  print('s[:k]'+'...')

k = int(input())
s = input()
n = len(s)

if n <= k 
print(s)

if n >= k
print(s[:k]+'...')

k = int(input())
s = raw_input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

K = int(input())
S = input()

if len(S) <= K:
    print(s)
else:
    print(s[:k] + "...")

k = int(input())
s = input()

if s <= k 
print(s)

if s >= k
print(s[:k]+'...')

k = int(input())
s = input()
n = len(s)

if s <= k :
print(s)

else :
print(s[:k] + '...')

k = int(input())
s = intput()

if len(s) <= k 
print(s)

if len(s) >= k
print(s[:k]+'...')

k = int(input())
s = input()
if k < len(s):
  print(s[:k] + "...")
else:
  print(s)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())

s = str(input())

n = len(s)

if n <= k:
    print(s)
else:
    print(s[0:k+1] + "...")


k = int(input())

s = str(input())

n = len(s)

if n <= k:
    print(s)
else:
    print(s[0:k+1] + "...")


k = int(input())

s = str(input())

n = len(s)

if n <= k:
    print(s)
else:
    print(s[0:k] + "...")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) >= K:
  print(S)
else:
  print(S[:K-1]+'...')

K = int(input())
S = input()
if len(S) >= K:
  print(S)
else:
  print(S[:K]+'...')

K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[0:K]+'...')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

length = len(s)
if K <= length:
    print(S)
else:
    print(S[:K] + '...')


K = int(input())
S = input()

length = len(s)
if K >= length:
    print(S)
else:
    print(S[:K] + '...')


K = int(input())
S = input()

if K >= len(S):
    print(S)
else:
    print(S[:K] + '...')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
n = int(input())
#print('n=',n)
m = input()
#print('m=',m)
o = len(m)
#print('o=',o)
if o <= n:
  print(m)
elif o > n:
  print(m[0:n],'...')

n = int(input())
#print('n=',n)
m = input()
#print('m=',m)
o = len(m)
#print('o=',o)
if o <= n:
  print(m)
elif o > n:
  print(m[0:n],'...',sep='')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
n = input()

if len(n)<=k:
  print(n)
  else:
    print(n[:k] + '...')
  
  

k = int(input())
n = input()
 
if len(n)<=k:
  print(n)
else:
  print(n[:k] + '...')

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = int(input())
if len(s) > k:
  print(s[:k])
else:
  print(s)

k = int(input())
s = input()
if len(s) > k:
  print(s[:k])
else:
  print(s)


k = int(input())
s = input()
if len(s) > k:
  print(s[:k] + '...')
else:
  print(s)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

slist = list(s)
if len(slist) > k:
  print('...' + slist[0])
else:
  print(s)

k = int(input())
s = input()

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    k += slist[i]
  print('...' + l)
else:
  print(s)


k = int(input())
s = input()

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    l += slist[i]
  print('...' + l)
else:
  print(s)


k = int(input())
s = input()

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    l += slist[i]
  print(l + '...')
else:
  print(s)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:5]+'...')


K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K]+'...')


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
abc166b
k=int(input())
s=input()
if len(s)<=k:
 print(s)
else:
 ss=s[:k]
 print(ss+'...')


#abc168b
k=int(input())
s=input()
if len(s)<=k:
 print(s)
else:
 ss=s[:k]
 print(ss+'...')


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(s[:K] + '...')

K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K] + '...')

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    T=[]
    S=list(S)
    for i in range(K):
        T.append(S[i])
        K="".join(T)
    print(K,"...")

K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    T=[]
    S=list(S)
    for i in range(K):
        T.append(S[i])
        K="".join(T)
    print(K+"...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
    print (S)
else:
    print (S[0:K], "...")


K = int(input())
S = input()
if len(S) <= K:
    print (S)
else:
    print (S[0:K]+ "...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = str(input())

if len(S) >= K-1:
  print(S[:K-1]+"...")
else:
  print(S)

K = int(input())
S = str(input())

if len(S) > K:
  print(S[:K]+"...")
else:
  print(S)


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=str(input())
if len(S)<=K:
  print(S)
else:
  print(S+"...")
  

K=int(input())
S=str(input())
if len(S)<=K:
  print(S)
else:
  b=""
  for i in range(K):
    b+=S[i]
  print(b+"...")
  

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
if(len(s)<=k):
  print(s)
else:
  print(s[:k+1]+'...')

k=int(input())
s=input()
if(len(s)<=k):
  print(s)
else:
  print(s[:k]+'...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

print(len(s))

if len(s) <= k:
  print(s)
else:
  print(s[:k] + "...")

k = int(input())
s = input()

if len(s) <= k:
  print(s)
else:
  print(s[:k] + "...")
  

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
x = len(s)

if k >= x:
  print(s)

else:
  print(s + "...")


k = int(input())
s = input()
x = len(s)

if k >= x:
  print(s)

else:
  print(s + "...")


k = int(input())
s = input()
x = len(s)

if k >= x:
  print(s)

else:
  print(s[0:k+1] + "...")


k = int(input())
s = inpur()
x = len(s)

if k >= s:
  print(s)

else:
  print(s + "...")

k = int(input())
s = inpur()
x = len(s)

if k >= x:
  print(s)

else:
  print(s + "...")


k = int(input())
s = input()
x = len(s)
if x <= k :
  print(s)
else:
  print(s[0:k] + "...")
  
  

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    _S = S[K:] + '...'
    print(_S)

K = int(input())
S = input()
if len(S) <= K:
    print(S)
if len(S) > K:
    _S = S[:K] + '...'
    print(_S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):

 k = int(input())

 s = input()


if k < len(s):  
    print(s[:k] + "...")
else:
    print(s)

k = int(input())

s = input()


if k < len(s):  
    print(s[:k] + "...")
else:
    print(s)


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
n = int(input())
s = input()
if len(s) <= n:
  print(s)
else:
  print(s[:k] + "...")

n = int(input())
s = input()
if len(s) <= n:
  print(s)
else:
  print(s[:n] + "...")


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
if len(s)>k:
    s=s[:k]+"...."
print(s)

k=int(input())
s=input()
if len(s)>k:
    s=s[:k]+".."
print(s)

k=int(input())
s=input()
if len(s)>k:
    s=s[:k]+"."
print(s)

k=int(input())
s=input()
if k>=len(s):
    print(s)
else:
    print(s[:k]+"...")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

print(len(S), K)
if K < len(S):
    print(f"{S[:K]}...")
else:
    print(S)


K = int(input())
S = input()

if K < len(S):
    print(f"{S[:K]}...")
else:
    print(S)


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    c=[]
    c[0:0]=s
    del c[k:]
    print(''.join(c))

k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    c=[]
    c[0:0]=s
    del c[k:]
    c.append('...')
    print(''.join(c))

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  S_ = S[0:K-1]
  print(S+'...')

K = int(input())
S = input()

if K == 1:
  print(S[0])
elif len(S) <= K:
  print(S)
else:
  S_ = S[0:K-1]
  print(S+'...')

K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  S_ = S[0:K]
  print(S_+'...')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    for i in range(K):
        print(S[i],end="")
    print("..."3)

K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    for i in range(K):
        print(S[i],end="")
    print("...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
print(s[:k+1]+"{0}".format("..."*(len(s)>k)))

k,s=open(0)
k=int(k)
print(s[:k]+'...'*(len(s)-1>k))


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
for s in S[K:]:
  s = '.'
print(S)

K = int(input())
S = input()
if len(S) > K:
  S = S[:K] + "..."
print(S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = str(input())

if len(S) <= K:
    print(S)
else:
    print(S[:K+1])

K = int(input())
S = str(input())

if len(S) <= K:
    print(S)
else:

    print(S[:K+1]+...)

K = int(input())
S = str(input())

if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
a = str(input())

if len(a) <= k:
	print(a)
else
	print(a[:k] + "...")

k = int(input())
a = str(input())
 
if len(a) <= k:
	print(a)
else:
	print(a[:k] + "...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K])

K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K] + '...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
s = [input() for i in range(2)]
if len(s[1]) > int(s[0]):
    print(s[1])
elif len(s[1]) <= int(s[0]):
    print(s[1][0:int(s[0])] + '...')



s = [input() for i in range(2)]
if len(s[1]) <= int(s[0]):
    print(s[1])
elif len(s[1]) > int(s[0]):
    print(s[1][0:int(s[0])] + '...')



Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):

import sys

def test(k,s):
    cnt=0

    length = len(s)
    if k<length:
        return s[:k]+'...'
    return s

if __name__ == '__main__':
    print(test(sys.argv[0],sys.argv[1]))



if __name__ == '__main__':
    k = int(input());
    s = input();

    cnt=0
    for i in s:
        print(i, end='')
        cnt+=1
        if cnt>=k:
            break

    if k < len(s):
        print('...')


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S=str(input())
K=int(input())
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")

S=input()
K=int(input())
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")

S=input()
K=input()
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")

S=str(input())
K=int(input())
if len(S)<=K:
    print(S)
else:
    print(S[0:K]+"...")

K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
n = int(input())
s = input()
l = len(s)
if len <= n:
    print(s)
else:
    print(s[:n] + '...')
    

n = int(input())
s = input()
l = len(s)
if l <= n:
    print(s)
else:
    print(s[:n] + '...')
    

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
print(s[:k] + '.' * (len(s) - k))

k=int(input());s=input();print(s[:k]+'.'*3*(len(s)>k))


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=str(input())
if len(s)<=k:
  print(s)
  exit()
else:
  print(s[:len(s)-1]+"...")

k=str(input())
s=int(input())
if len(s)<=k:
  print(s)
  exit()
else:
  print(s[len(s-1):]+"...")


k=int(input())
s=str(input())
if len(s)<=k:
  print(s)
  exit()
else:
  print(s[0:k-1]+"...")

k=int(input())
s=str(input())
if len(s)<=k:
  print(s)
  exit()
else:
  print(s[0:k]+"...")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(imput())
S = imput()

if len(S) <= K:
    print(S)
else:
    print(S[0: K] + '...')

if len(S) <= K:
    print(S)
else:
    print(S[0: K] + '...')

K = int(input('数字：'))
S = input('文字列：')


if len(S) <= K:
    print(S)
else:
    print(S[0: K] + '...')

K = int(input())
S = input()


if len(S) <= K:
    print(S)
else:
    print(S[0: K] + '...')

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
print(S if len(S)<=K else S[0:K]+"."*(len(S)-K)) 

K=int(input())
S=input()
print(S if len(S)<=K else S[0:K]+"."*3) 

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=list(input())
ss=("").join(s)
S=len(s)
if S<=k:
  print(ss)
else:
  print(ss+("..."))

k=int(input())
s=list(input())
ss=("").join(s)
S=len(s)
sss=("").join(s[0:k])
if S<=k:
  print(ss)
else:
  print(sss+("..."))

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
S = input()
if len(S) > K:
  print(S[:K]+"...")
else:
  print(S)


k = int(input())
S = input()
if len(S) > K:
  print(S[:K])
else:
  print(S)

K = int(input())
S = input()
if len(S) > K:
  print(S[:K])
else:
  print(S)


K = int(input())
S = input()
if len(S) > K:
  print(S[:K]+"...")
else:
  print(S)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
s=input()
k=int(input())
if len(s)> k:
  print(s[:k]+'...')
if len(s)<=k:
  print(s)

k=int(input())
s=input()
if len(s)> k:
  print(s[:k]+'...')
if len(s)<=k:
  print(s)


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
if len(s)==k:
  print(s)
else:
  print(s[:k+1]+"...")
  

k=int(input())
s=input()
if len(s)<=k:
  print(s)
else:
  print(s[:k]+"...")


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
ans = ""
if K >= len(S):
    print(S)
else:
    for i in range(K):
        ans += S[i]
    print(ans + "…")

K = int(input())
S = input()
ans = ""
if K >= len(S):
    print(S)
else:
    for i in range(K):
        ans += S[i]
    print(ans + "...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S=input()
K=int(input())

if len(S) <= K:
    print(S)
else :
    print(S[0:K]+"...")

K=int(input())
S=input()

if len(S) <= K:
    print(S)
else :
    print(S[0:K]+"...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[0:K]+'...')

K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[0:K]+'...')

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k])


m = int(input())
k = input()
if len(k) <= m:
    print(k)
else:
    print(k[:m])


k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k]+'...')


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K, S = int(input()), input()
if len(S) <= K:
  print(S)
else:
  print(S[:K] + ...)

K, S = int(input()), input()
if len(S) <= K:
  print(S)
else:
  print(S[:K] + "...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
a = int(input())
b = input()
if len(b) < a:
    print(b[:a]+'...')
else:
    print(b)

a = int(input())
b = input()
if len(a) < b:
    print(b[:a]+'...')
else:
    print(b)

a = int(input())
b = input()
if len(b) > a:
    print(b[:a]+'...')
else:
    print(b)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
len_S = len(S)

if len_S <= K:
    print(S)
else:
    ans = S[:K+1]
    print(ans+"...")


K = int(input())
S = input()
len_S = len(S)

if len_S <= K:
    print(S)
else:
    ans = S[:K]
    print(ans+"...")


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
ans = ""
if(k<len(s)):
    ans += s[0:k]
    ans += ans.ljust(len(s),'.')
else:
    ans+=s[0:k]

print(ans)


k = int(input())
s = input()
ans = ""
if(k<len(s)):
    ans += s[0:k]
    ans.ljust(len(s)-k,'.')
else:
    ans+=s[0:k]

print(ans)


k = int(input())
s = input()
ans = ""
if(k<len(s)):
    ans += s[0:k]
    ans += '...'
else:
    ans+=s[0:k]

print(ans)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
from sys import stdin
import math
a=int(stdin.readline())
b=stdin.readline()

if len(b)<=a:
    print(b)
else:
    for k in range(0,a):
        print(b[k],end='')
    print('...',end='')

from sys import stdin

a=int(stdin.readline())
b=stdin.readline()

if len(b)-1<=a:
    print(b)
else:
    b=b[:a]
    b=b+'...'
    print(b)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
a = len(S)
if a <= K:
    print(S)
else:
    print(str(S[0:K]))


# ABC168
# B (Triple Dots)
K = int(input())
S = input()
a = len(S)
if a <= K:
    print(S)
else:
    print(str(S[0:K])+'...')


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
n = input()
if len(n)>k:
    print(n+'...')
else:
    print(n)

k = int(input())
n = input()
if len(n)>k:
    print(n[:k]+'...')
else:
    print(n)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
n = int(input())
a = input()
if len(a) > n:
  print(a[0:n+1]+'...')
else:
  print(a )

n = int(input())
a = input()
if len(a) > n:
  print(a[0:n+1])
else:
  print(a +'...')

n = int(input())
a = input()
if len(a) > n:
  print(a[0:n+1])
else:
  print(a)

n = int(input())
a = input()
if len(a) > n:
  print(a[0:n]+'...')
else:
  print(a )

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
if len(s) > k:
    print (s[: k + 1] + "...")
else:
    print(s)


k = int(input())
s = input()
if len(s) > k:
    print (s[: k] + "...")
else:
    print(s)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) > K:
    print(S[:-K+1] + '...')
else:
    print(S)

K = int(input())
S = input()
if len(S) > K:
    print(S[:K] + '...')
else:
    print(S)


Verdicts: Wrong Answer

Accepted
Problem: Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively.  An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to make one full rotation, respectively.  At 0 o'clock, the two hands overlap each other. H hours and M minutes later, what is the distance in centimeters between the unfixed endpoints of the hands?

Submission attempts (in order):
import math

a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
if th == 0:
    print(abs(a - b))
    #print('{:.20f}'.format(abs(a - b)))
    exit()
elif th == 180:
    print(a + b)
    #print('{:.20f}'.format(a + b))
    exit()
if th >= 180:
    th -= 180
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b * cos
print(ans**0.5)
#print('{:.20f}'.format(math.sqrt(ans)))

import math

a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
print(th)
if th == 0:
    print('{:.20f}'.format(abs(a - b)))
    exit()
elif th == 180:
    print('{:.20f}'.format(a + b))
    exit()
if th >= 180:
    th = 360 - th
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b * cos
print('{:.20f}'.format(math.sqrt(ans)))

import math

a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
if th == 0:
    print('{:.20f}'.format(abs(a - b)))
    exit()
elif th == 180:
    print('{:.20f}'.format(a + b))
    exit()
if th >= 180:
    th = 360 - th
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b * cos
print('{:.20f}'.format(math.sqrt(ans)))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively.  An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to make one full rotation, respectively.  At 0 o'clock, the two hands overlap each other. H hours and M minutes later, what is the distance in centimeters between the unfixed endpoints of the hands?

Submission attempts (in order):
import sys
import math

input = sys.stdin.readline
sys.setrecursionlimit(4100000)


def main():
    A, B, H, M = map(int, input().rstrip().split())
    theta_m = 2 * math.pi * M / 60
    theta_h = 2 * math.pi * (H * 60 + M) / (12 * 60)
    theta = (theta_h - theta_m) % math.pi
    ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))
    print(theta_m)
    print(theta_h)
    print(theta)
    print(ans)


if __name__ == '__main__':
    main()


import sys
import math

input = sys.stdin.readline
sys.setrecursionlimit(4100000)


def main():
    A, B, H, M = map(int, input().rstrip().split())
    theta_m = 2 * math.pi * M / 60
    theta_h = 2 * math.pi * (H * 60 + M) / (12 * 60)
    theta = (theta_h - theta_m) % math.pi
    ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))
    
    
    
    print(ans)


if __name__ == '__main__':
    main()


import sys
import math

input = sys.stdin.readline
sys.setrecursionlimit(4100000)


def main():
    A, B, H, M = map(int, input().rstrip().split())
    theta_m = 2 * math.pi * M / 60
    theta_h = 2 * math.pi * (H * 60 + M) / (12 * 60)
    if theta_h > theta_m:
        theta = (theta_h - theta_m) % math.pi
    else:
        theta = (theta_m - theta_h) % math.pi
    ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))
    
    
    
    print(ans)


if __name__ == '__main__':
    main()


import sys
import math

input = sys.stdin.readline
sys.setrecursionlimit(4100000)


def main():
    A, B, H, M = map(int, input().rstrip().split())
    theta_m = 2 * math.pi * M / 60
    theta_h = 2 * math.pi * (H * 60 + M) / (12 * 60)
    theta = abs(theta_m - theta_h)
    if theta > math.pi:
        theta = 2 * math.pi - theta
    ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))
    
    
    
    print('{:.20f}'.format(ans))


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively.  An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to make one full rotation, respectively.  At 0 o'clock, the two hands overlap each other. H hours and M minutes later, what is the distance in centimeters between the unfixed endpoints of the hands?

Submission attempts (in order):
import sys
import math

def resolve():
A, B, H, M = map(int, sys.stdin.readline().split())
theta = (H * 30 + M * 0.5)  - (M * 6)
ans = math.sqrt((A**2 + B**2) - (2 * A * B) * math.cos(math.radians(theta)))
print('{:.20f}'.format(ans))

import sys
import math

A, B, H, M = map(int, sys.stdin.readline().split())
theta = (H * 30 + M * 0.5)  - (M * 6)
ans = math.sqrt((A**2 + B**2) - (2 * A * B) * math.cos(math.radians(theta)))
print('{:.20f}'.format(ans))

Verdicts: Runtime Error

Accepted
Problem: Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively.  An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to make one full rotation, respectively.  At 0 o'clock, the two hands overlap each other. H hours and M minutes later, what is the distance in centimeters between the unfixed endpoints of the hands?

Submission attempts (in order):
import math

Inp = input()
List = Inp.split(" ")
A = int(List[0])
B = int(List[1])
H = int(List[2])
M = int(List[3])

DegA = int(H*30 + M*0.5)
DegB = int(M*6)

   

Deg =abs(DegA - DegB)

C = (A**2 + B**2 - 2*B*A*math.cos(math.radians(Deg)))**0.5

print(format(C,'.10f'))

import math

Inp = input()
List = Inp.split(" ")
A = int(List[0])
B = int(List[1])
H = int(List[2])
M = int(List[3])

DegA = int(H*30 + M*0.5)
DegB = int(M*6)


if abs(DegA - DegB) <= 180:
    Deg = DegA - DegB

else:

    if DegA > DegB:
        Deg = 360 - DegA + DegB

    else:
        Deg = 360 - DegB + DegA
    
C = (A**2 + B**2 - 2*B*A*math.cos(math.radians(Deg)))**0.5

print(format(C,'.10f'))

import math

Inp = input()
List = Inp.split(" ")
A = int(List[0])
B = int(List[1])
H = int(List[2])
M = int(List[3])

   

Deg = math.radians(abs(0.5 * (60 * H + M) - 6 * M))

C = math.sqrt((A**2 + B**2 - 2*A*B*math.cos(Deg)))

print(format(C,'.20f'))

Verdicts: Wrong Answer

Wrong Answer

Accepted