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 5 years have passed since last update.

2*2行列を数値として処理するRuby

Last updated at Posted at 2018-12-14
x = readlines.map{|line| line.chomp.split(/\s/).map(&:to_i)}
puts x.map{|row| row.map{|i| i+1} }.map{|row| row.join(" ")}.join("\n")
=begin
1 1
1 1
が
2 2
2 2
=end

参考

参考にしたWebサイトや技術書などを列挙する

次にやること

線形代数をやる

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?