4
4

More than 1 year has passed since last update.

競技プログラミングでの標準入力

Last updated at Posted at 2022-01-02

真面目に取り組み始めたばかりでよく忘れるので整理(Atcoder:灰色)

入力1
a = input() # <= 'abc'
print(a) # abc
入力2
b = int(input()) # <= '10'
print(b) # 10
入力3
c, d = input().split() # <= 's t'
print(c) # s
print(d) # t
入力4
e, f = map(int,input().split()) # <= '10 20'
print(e) # 10
print(f) # 20
入力5
g = input().split() # <= '1 2 3 4 5'
print(g) # ['1', '2', '3', '4', '5']
入力6
h = list(map(int, input().split())) # <= '1 2 3 4 5'
print(h) # [1, 2, 3, 4, 5]
4
4
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
4
4