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?

More than 1 year has passed since last update.

SwiftでPaizaに挑戦する(備忘録)

Posted at

標準入力の受け取り方(C級)

以下のように1行目に整数を空白区切りで2つ
2行目に整数を空白区切りで3つ受け取る場合

N M
A B C

let input = readLine()!.split(separator: " ").map { Int($0)! }
let n = input[0]
let m = input[1]

let costs = readLine()!.split(separator: " ").map { Int($0)! }
let a = costs[0]
let b = costs[1]
let c = costs[2]

※問題を解いていき次第追加していきます。

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?