arrow_forward همه ارسال‌ها

جزئیات ارسال کد#861

code_blocks
مسئله مربوطه: الماس (#35) arrow_outward
verified
وضعیت داوری نهایی: پاسخ نادرست تست 1
terminal
زبان برنامه‌نویسی: Python
schedule
ارسال‌کننده و زمان:
Amir Mohammad Baghche sara (۱۰ ماه پیش)
descriptionsolution.py ۱۳ خط • ۱۸۹ بایت
1n=int(input())
2m = n//2
3
4def line(n,i):
5 s = 2 * i -1
6 e = int( (n - s) / 2 )
7 print(e*" ",s*"*",e*" ")
8
9
10for i in range(1,m+2):
11 line(n,i)
12for i in range(m+2,n+1):
13 line(n,n-i+1)
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8