难,太难了!究竟该用什么方法哪!在线求救!

3 comments

  • @ 2024-7-19 12:48:00

    👍 niu

    👍 1
    🤔 1
    • @ 2024-2-28 18:57:26

      谢谢

      • @ 2024-2-27 10:57:12

        这题主要是因为语法特性问题,python的print()默认结尾是换行,而题目则是紧跟着,所以这里要学会print的进阶用法,写法如下:

        ```
        a=input()
        b=int(input())
        for i in range(b):
             print(a,end="")
        

        end=""以什么结尾,比如“,”里面写的逗号就会以逗号结尾,没写则不会,默认是换行

        👍 5
      • 1

      Information

      ID
      64
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      4
      Tags
      # Submissions
      131
      Accepted
      56
      Uploaded By