This file contains hidden or 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
| source ./bigint.vim | |
| function! Fib(n) abort | |
| let [a,b,i] = [FromString("0"),FromString("1"),0] | |
| while i < a:n | |
| let [a,b,i] = [b,BigAdd(a,b),i+1] | |
| endwhile | |
| return ToString(a) | |
| endfunction |
This file contains hidden or 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
| reltime: 54.894354 |
This file contains hidden or 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
| let g:bigint = {'num': [], 'sign': 1} | |
| let g:nodeMaxDigit = 8 | |
| let g:nodeMaxNum = 100000000 | |
| function! Isdigit(str) | |
| return match(a:str, '^[+-]\?\d\+$') != -1 | |
| endfunction | |
| function! StringToBigint(str) | |
| if Isdigit(a:str) != 1 |
This file contains hidden or 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
| let s:name = 'World' | |
| echo "\nHello" . s:name | |
| function! Isdigit(str) | |
| return match(a:str, '^[+-]\?\d\+$') != -1 | |
| endfunction | |
| let g:bigint = {'num': [], 'sign': 1} | |
| let g:nodeMaxDigit = 8 |
This file contains hidden or 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
| x27[32;01m * x27[39;49;00mPackage: dev-lang/R-3.1.2 | |
| x27[32;01m * x27[39;49;00mRepository: gentoo | |
| x27[32;01m * x27[39;49;00mMaintainer: [email protected] [email protected] | |
| x27[32;01m * x27[39;49;00mUSE: abi_x86_64 amd64 elibc_glibc kernel_linux nls openmp readline userland_GNU | |
| x27[32;01m * x27[39;49;00mFEATURES: preserve-libs sandbox userpriv usersandbox | |
| x27[32;01m*x27[0m Using following Fortran compiler: | |
| x27[32;01m*x27[0m F77: x86_64-pc-linux-gnu-gfortran | |
| x27[32;01m*x27[0m FC: x86_64-pc-linux-gnu-gfortran | |
| x27[32;01m*x27[0m x86_64-pc-linux-gnu-gfortran has OPENMP support | |
| >>> Unpacking source... |
This file contains hidden or 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
| >>> from uzumaki import * | |
| >>> [uzumaki(x) for x in range(20)] | |
| [(0, 0), (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1), (2, -1), (2, 0), (2, 1), (2, 2), (1, 2), (0, 2), (-1, 2), (-2, 2), (-2, 1), (-2, 0), (-2, -1)] | |
| >>> uzumaki(1000000000) | |
| (1683, -15811) |
This file contains hidden or 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
| switch(i%4): | |
| case 0: | |
| thinca | |
| case 1: | |
| kyubuns | |
| case 2: | |
| supermomonga | |
| case 3: | |
| aomoriringo |
This file contains hidden or 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
| """"""""""""""""""""" | |
| " general | |
| """"""""""""""""""""" | |
| set number | |
| set tabstop=2 | |
| set laststatus=2 | |
| set t_Co=256 | |
| set expandtab | |
| set noswapfile |
This file contains hidden or 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
| (* parameters *) | |
| (* 最大次数 *) | |
| maxOrderNum = 200; | |
| (* 画像URL, もしくはローカルパス *) | |
| imageURL = "http://nex.fm/wp-content/uploads/2012/08/vim-editor_logo.png"; | |
| pointListToLines[pointList_, neighbothoodSize_: 6] := | |
| Module[{L = DeleteDuplicates[pointList], NF, lambda, | |
| lineBag, counter, seenQ, sLB, nearest, | |
| nearest1, nextPoint, couldReverseQ, d, n, s}, |
This file contains hidden or 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
| import Data.Char | |
| main = do | |
| l <- getLine | |
| let nums = map digitToInt l | |
| putStrLn $ show $ maxNum nums | |
| maxNum :: [Int] -> Int | |
| maxNum [] = 0 | |
| maxNum all@(x:xs) = max (product (take 5 all)) (maxNum xs) |