编程题代码贴上,可能代码略丑:
https://paste.ubuntu.com/p/VWYCvtV9B4/