Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

2014-04-20から1日間の記事一覧

TbpgrUtils | 追加要件 Integer#palindromic_prime? 追加

概要 追加要件 Integer#palindromic_prime? 追加 詳細 追加要件 Integer#palindromic_prime? 仕様 ・回分素数か判定します ※より詳細についてはGitHubのREADMEおよびテストケース参照 GitHub https://github.com/tbpgr/tbpgr_utils Rubygems http://rubygems…

Ruby | Integer | odd?

概要 Integer#odd? 詳細 数値が奇数か判定します。 サンプルコード # encoding: utf-8 (1..10).each { |v| puts "#{v} is odd? :#{v.odd?} " } 出力 1 is odd? :true 2 is odd? :false 3 is odd? :true 4 is odd? :false 5 is odd? :true 6 is odd? :false 7…