I hereby claim:
- I am jjst on github.
- I am jjst (https://keybase.io/jjst) on keybase.
- I have a public key ASB_mVhGrGeoqucZVHdDPclapEOSaJ9k7ved2NtHPL4BKQo
To claim this, I am signing this object:
module Main exposing (main) | |
import Html exposing (Html) | |
-- MODEL | |
type alias Model = | |
List Bool |
import java.util.*; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
public class Solution { | |
static String rawString = "73167176531330624919225119674426574742355349194934\n" + | |
"96983520312774506326239578318016984801869478851843\n" + | |
"85861560789112949495459501737958331952853208805511\n" + | |
"12540698747158523863050715693290963295227443043557\n" + |
module Main exposing (..) | |
import String | |
import Html exposing (text) | |
type Turn | |
= L | |
| R | |
| Stay |
I hereby claim:
To claim this, I am signing this object:
import Data.List | |
import Data.Char | |
input = "73167176531330624919225119674426574742355349194934\ | |
\96983520312774506326239578318016984801869478851843\ | |
\85861560789112949495459501737958331952853208805511\ | |
\12540698747158523863050715693290963295227443043557\ | |
\66896648950445244523161731856403098711121722383113\ | |
\62229893423380308135336276614282806444486645238749\ | |
\30358907296290491560440772390713810515859307960866\ |
s = """ | |
73167176531330624919225119674426574742355349194934 | |
96983520312774506326239578318016984801869478851843 | |
85861560789112949495459501737958331952853208805511 | |
12540698747158523863050715693290963295227443043557 | |
66896648950445244523161731856403098711121722383113 | |
62229893423380308135336276614282806444486645238749 | |
30358907296290491560440772390713810515859307960866 | |
70172427121883998797908792274921901699720888093776 | |
65727333001053367881220235421809751254540594752243 |
# Solution for https://www.hackerrank.com/challenges/game-of-throne-ii | |
from collections import Counter | |
from math import factorial as f | |
word = raw_input() | |
letter_count = [i/2 for i in Counter(word).values()] | |
print (f(sum(letter_count)) / (reduce(lambda acc, x: acc * f(x), letter_count, 1))) % (10**9 + 7) |
trait ASTElement | |
case class Expression(elements: ASTElement*) extends ASTElement | |
case class Literal[T](value: T) extends ASTElement | |
case class Function(name: String) extends ASTElement | |
object LispParser { | |
def main(args: Array[String]) { | |
val ast = parse("(first (list 1 (+ 2 3) 9))") | |
assert(ast == |
/** | |
* Created by jjst on 21/03/16. | |
*/ | |
object Floors { | |
def main(args: Array[String]): Unit = { | |
Console.println(floorNumber1("())")) | |
Console.println(floorNumber2("())")) | |
Console.println(floorNumber2("")) | |
} |