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
| (function () { | |
| var root = this; | |
| var leet = {}; | |
| if (typeof exports !== 'undefined') { | |
| if (typeof module !== 'undefined' && module.exports) { | |
| exports = module.exports = leet; | |
| } | |
| exports.leet = leet; |
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
| /* 83byte */ | |
| for(i=0;i++<100;)document.write([,,f="Fizz",,b="Buzz",f,,,f,b,,f,,,f+b][i%15-1]||i) |
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
| def gcd(a, b) | |
| if b == 0 then | |
| a | |
| else | |
| gcd(b, a % b) | |
| end | |
| end | |
| def lcm(a, b) | |
| a * b / gcd(a, b) |
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
| // ==UserScript== | |
| // @name mezashi.js | |
| // @namespace http://st98.github.io | |
| // @description 「目指す」を「めざし」に置換するユーティリティ。 | |
| // @include * | |
| // ==/UserScript== | |
| ;(function () { | |
| document.body.innerHTML = document.body.innerHTML.replace(/(目[指差]|めざ)[さ-そ]/g, 'めざし'); | |
| }).call(this); |
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
| # ユークリッドの互除法(非再帰) | |
| def gcd_euclid_l(a, b) | |
| while 0 do | |
| break if b == 0 | |
| a, b = b, a % b | |
| end | |
| a | |
| end |
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
| (function () { | |
| var isFizz = function (n) { | |
| var res = n.toString(3); | |
| res = res[res.length - 1] === '0'; | |
| return res; | |
| }; | |
| var isBuzz = function (n) { | |
| var res = n.toString(5); | |
| res = res[res.length - 1] === '0'; |
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
| var bfeval = function (source) { | |
| var | |
| code = '', | |
| index = 0, | |
| length = source.length, | |
| result; | |
| code += '(function () {'; |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/types.h> | |
| #define G ptr++; | |
| #define L ptr--; | |
| #define P (*ptr)++; | |
| #define M (*ptr)--; | |
| #define D putchar(*ptr); | |
| #define C *ptr=getchar(); |
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
| (function () { | |
| 'use strict'; | |
| var root = this; | |
| var ascii = {}; | |
| var prevAscii = root.ascii; | |
| if (typeof exports !== 'undefined') { | |
| if (typeof module !== 'undefined' && module.exports) { |
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 functools import reduce | |
| from operator import mul | |
| def fact(n): | |
| return reduce(mul, range(1, n + 1)) |