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
# deepcopyに必要なやつ | |
require 'active_support' | |
require 'active_support/core_ext' | |
# 目標ろんめんぺい金額 | |
START = 808888 | |
GOAL = 888888 | |
# 各種CEで取得可能な金額とラベル | |
PATTERN = { |
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: sjis | |
# 1 | |
# using for | |
def sum_for(list) | |
sum = 0 | |
for i in list | |
sum += i | |
end | |
sum |
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: sjis | |
# | |
# とある世界のタクシー料金を計算する | |
# Author:: lithtle | |
# Created_At:: 2015-04-21 | |
# Link:: http://nabetani.sakura.ne.jp/hena/ord30taxi/ | |
# 都市の地点と経路 | |
CITY = { |

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
#! /usr/bin/env ruby -Ku | |
# -*- coding:utf-8 -*- | |
def range(s, e, jump=1) | |
(s...e).step(jump) do |i| | |
yield i | |
end | |
end | |
# test |
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
#! /usr/bin/env ruby -Ku | |
# -*- coding: utf-8 -*- | |
# なるべく少ない回数で指定した重さのものをある一定の重さ(>=1.0)以上にするのに | |
# 必要な羽の生えた巻物の試行回数と重さを計算する | |
# 祝福羽の生えた巻物と通常時の巻物の重さ軽減倍率 | |
RATIO = { | |
"blessed" => 0.78, | |
"normal" => 0.85 |
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
# -*- coding:utf-8 -*- | |
Inf = 1.0 / 0 | |
class Operator | |
def initialize(a, b) | |
@left = a | |
@right = b | |
end | |
attr_reader :left, :right |
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
rspec の練習 | |
http://d.hatena.ne.jp/t-wada/20100228/p1 より |
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
#! /usr/bin/ruby -Ku | |
# -*- coding:utf-8 -*- | |
# 突然の死(AA略 を表示して遊ぶ | |
# | |
# Date:: 2012-06-07 | |
# Author:: lithtle | |
# Copyright:: copyright (c) 2012 lithtle | |
# Example:: | |
# _人人人人_ |
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
*~ | |
sample10* | |
sample100* | |
sample1000* | |
sample10000* | |
sample100000* |
NewerOlder