100 #P1750. 实现 rjust 函数
实现 rjust 函数
题目描述
实现Python中的 rjust(s, width, fillchar) 函数,rjust 的作用是返回一个原字符串s右对齐,并使用fillchar填充至长度width的新字符串。 如果指定的长度小于字符串的长度则返回原字符串。
本题需要递交的内容
- rjust以及相关函数(无需提交 test_rjust 以及 ensure 函数)
- 以下三行代码
s = input()
width = int(input())
fillchar = input()
print(rjust(s, width, fillchar))
gua
5
*
**gua