0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

文字列と N 個の整数の出力 Python3編

Posted at

次はこれ
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__specific_format_step2
文字列中に指定された整数を埋め込み、出力するという問題

間違ってないはずだったが間違っていたので調べてみると、
()と()の間はコンマだけだと思ってたら半スペも入ってたから。

Arr = input().split()
N = int(Arr[0])
A = int(Arr[1])
B = int(Arr[2])
for i in range(1,N+1):
    if i != N:
        print(f"({A}, {B})",end=", ")
    else:
        print(f"({A}, {B})")

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?