# Enter your code here. Read input from STDIN. Print output to STDOUT N=int(input()) M=int(input())
b="welcome"
for i in range(1,N+1):
if i<(N+1)/2:
s = ".|." * (2 * i - 1)
print(s.center(M,'-'))
k=2*i-1
if i==(N+1)/2:
print(b.center(M,'-'))
if i>((N+1)/2):
l=".|."*k
print(l.center(M,'-'))
k=k-2
this code is running properly in pycham but hackerrank says compile time erro
Aucun commentaire:
Enregistrer un commentaire