Skip to content

Instantly share code, notes, and snippets.

View kyodaisuu's full-sized avatar

Fish kyodaisuu

View GitHub Profile
@kyodaisuu
kyodaisuu / graham.py
Created December 10, 2019 15:28
Graham's number
#!/usr/bin/python
# coding: utf-8
# Print Graham's number
#
# Just a code for showing definition.
# It causes runtime error of maximum recursion.
def G(n):
# G function of Graham's number
if n == 0:
@kyodaisuu
kyodaisuu / bagpuzzle.py
Last active September 14, 2018 05:06
呪いのかばんパズル
#!/usr/bin/env python3
# 呪いのカバンパズル
# https://togetter.com/li/1265539
# 以下のアルゴリズムの計算
# https://twitter.com/kyodaisuu/status/1039229105357520897
# 若干アルゴリズムを調整した
from statistics import mean, median, stdev
from scipy.optimize import fmin
import math
syntax on
set autoindent
set expandtab
let _curfile=expand("%:r")
if _curfile == 'Makefile'
set noexpandtab
endif
set tabstop=4
set shiftwidth=4
set cursorline