This file contains 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
numbers = [] | |
mnumbers = [] | |
mnumbers_rev = [] | |
ans = [] | |
999.downto(1){|down| | |
numbers << down | |
} | |
numbers.each do |numbers_first| | |
numbers.each do |numbers_second| |
This file contains 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
require "prime" | |
p 600851475143.prime_division.last |
This file contains 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
a = 1 | |
b = 2 | |
sum = 0 | |
ans = 0 | |
while sum < 4000000 | |
if b % 2 == 0 | |
ans = ans += b | |
end | |
sum = a + b | |
a = b |
This file contains 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
# -*- encoding: utf-8 -*- | |
require 'twitter' | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
OAUTH_TOEKN = "" | |
OAUTH_TOEKN_SECRET = "" | |
Twitter.configure do |config| | |
config.consumer_key = CONSUMER_KEY |
NewerOlder