diff --git a/ruby/day_25.rb b/ruby/day_25.rb new file mode 100644 index 0000000..6883d28 --- /dev/null +++ b/ruby/day_25.rb @@ -0,0 +1,15 @@ +row = 2981 +col = 3075 + +i = row*(row-1)/2 + 1 +i += (row..row+col-1).inject(:+) - row + +value = 20151125 +(i-1).times do + value *= 252533 + value %= 33554393 +end +puts value + +__END__ +Enter the code at row 2981, column 3075.