-
-
Save giruzou/8eb62816d609d2085351b7ad63241e97 to your computer and use it in GitHub Desktop.
Ruby各桁の総和計算 ref: https://qiita.com/DrqYuto/items/bc9336ebfa2436a65c2c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puts gets.chomp.chars.map(&:to_i).inject(:+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment