Skip to content

Instantly share code, notes, and snippets.

@sasamijp
Created August 13, 2013 02:57
Show Gist options
  • Save sasamijp/6217477 to your computer and use it in GitHub Desktop.
Save sasamijp/6217477 to your computer and use it in GitHub Desktop.
# -*- encoding: utf-8 -*-
require 'rubygems'
require 'twitter'
Twitter.configure do |config|
config.consumer_key = ""
config.consumer_secret = ""
config.oauth_token = ""
config.oauth_token_secret = ""
end
input = gets.to_i
sosu = true
i = 2
while i < input do
if input%i == 0 then
sosu = false
break
end
i = i + 1
end
if sosu == true then
Twitter.update "\n     / )
    / ( 
  /   ヽ
   ◜◔。◔◝ 
  |  | #{input}は素数〜!!
   | ⊃ ⊃
  └-⊃~⊃"
else Twitter.update "\n     / )
    / ( 
  /   ヽ
   ◜◔。◔◝ 
  |  | #{input}は素数じゃない〜!!
   | ⊃ ⊃
  └-⊃~⊃"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment