Skip to content

Instantly share code, notes, and snippets.

@hamuhei1412
Last active March 21, 2018 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamuhei1412/f72a8712321589617402e88fa7a7a1cc to your computer and use it in GitHub Desktop.
Save hamuhei1412/f72a8712321589617402e88fa7a7a1cc to your computer and use it in GitHub Desktop.
moke = gets #文字列を取得
puts moke.count("1") #.countの引数に"1"を指定することで、1の数を出力
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment