Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3
fibs = 0 : 1 : zipWith (+) fibs (tail fibs) main = putStrLn (head fibs)
-
1 2
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-
1 2 3 4 5 6 7 8 9
import Control.Monad import Control.Applicative import Text.Printf solve :: String -> Int solve s = let t = "HACKERCUP"; cnt c = length . filter (==c) in minimum . flip map t $ \c -> div (cnt c s) $ cnt c t fhcMain f m = do n <- readLn
...
-
1 2 3 4 5 6 7 8 9
--答えの出力 printAns :: Integer -> Integer -> IO() printAns tc s = putStrLn $ ("Case #" ++ (show tc) ++ ": " ++ (show s)) -- "HACKERUP"としたのはCを2回数える必要はないから. f a=foldr min 999$map(\x->if fst x=='C'then snd x`div`2 else snd x)$zip"HACKERUP"$map(\c->sum$map(\x->if x==c then 1 else 0)a)"HACKERUP" solveTC :: Integer -> Integer -> IO () solveTC 0 _ = return ()
...
-
1 2 3 4 5 6 7 8 9
--答えの出力 printAns :: Integer -> Integer -> IO() printAns tc s = putStrLn $ ("Case #" ++ (show tc) ++ ": " ++ (show s)) -- "HACKERUP"としたのはCを2回数える必要はないから. f a=foldr min 999$map(\x->if fst x=='C'then snd x`div`2 else snd x)$zip"HACKERUP"$map(\c->sum$map(\x->if x==c then 1 else 0)a)"HACKERUP" solveTC :: Integer -> Integer -> IO () solveTC 0 _ = return ()
...
-
1 2 3 4 5 6 7 8 9
import Data.List(foldl') -- check parentheses and brackets checkPnB :: String -> Bool checkPnB = null . foldl' check [] where check [] x | x `elem` "([)]" = [x] | otherwise = [] check s@(y:ys) x | x `elem` "([" = x:s | y `match` x = ys
...
-
1 2 3 4 5 6 7 8
fib::Int -> Int -> [Int] fib a b = a : (fib b $ a + b) main::IO () main = do print $ take 20 $ fib 0 1 return ()
-
1 2 3 4 5 6 7 8
fib::Int -> Int -> [Int] fib a b = a : (fib b $ a + b) main::IO () main = do print $ take 2000 $ fib 0 1 return ()
-
1 2 3 4 5 6 7 8
fib::Int -> Int -> [Int] fib a b = a : (fib b $ a + b) main::IO () main = do print $ take 20 $ fib 0 1 return ()
-
1 2 3 4 5 6 7 8
fib::Int -> Int -> [Int] fib a b = a : fib b $ a + b main::IO () main = do print $ take 20 $ fib 0 1 return ()
-
1 2 3 4 5 6 7 8
fib::Int -> Int -> [Int] fib a b = a : fib b $ a + b main::IO () main = do putStrLn $ take 20 $ fib 0 1 return ()
-
1 2 3 4
main::IO () main = do putStrLn "Hello World!" return ()
-
1 2 3 4
main::IO () main = do putStrLn "test" return ()
-
1
show "test"
-
1
main = interact (\_ -> "butts")
-
1
Main = interact (\_ -> "butts")
-
1 2 3 4 5 6 7 8 9
-- ConstraintKinds + PolyKinds example {-# LANGUAGE ConstraintKinds, TypeFamilies, PolyKinds #-} module KindTest2 where import Data.ByteString (ByteString) import Data.Traversable (Traversable(..)) import GHC.Prim (Constraint) type family Listable t a :: Constraint type instance Listable [] a = (Traversable a, a ~ [])
...
-
1 2 3 4 5 6 7 8 9
module Main where import System import Control.Monad.Reader import Control.Monad.Writer import Control.Monad.State import Control.Monad.Error import Control.Monad.IO.Class
...
-
1 2 3 4 5 6 7 8 9
Resolving dependencies... Configuring base-unicode-symbols-0.2.2.3... Preprocessing library base-unicode-symbols-0.2.2.3... Building base-unicode-symbols-0.2.2.3... [ 1 of 12] Compiling Data.Ord.Unicode ( Data\Ord\Unicode.hs, dist\build\Data\Ord\Unicode.o ) [ 2 of 12] Compiling Data.Monoid.Unicode ( Data\Monoid\Unicode.hs, dist\build\Data\Monoid\Unicode.o ) [ 3 of 12] Compiling Data.List.Unicode ( Data\List\Unicode.hs, dist\build\Data\List\Unicode.o ) [ 4 of 12] Compiling Data.Function.Unicode ( Data\Function\Unicode.hs, dist\build\Data\Function\Unicode.o ) [ 5 of 12] Compiling Data.Foldable.Unicode ( Data\Foldable\Unicode.hs, dist\build\Data\Foldable\Unicode.o )
...
-
1 2 3 4 5 6 7 8 9
class Hello { public static void main (String[] args) { Scanner Hello = newScanner; double inputone, inputtwo, inputthree; System.out.println ("dit is een rekenmachine voor plus sommen"); System.out.println ("voer eerste nummer in"); }
-
1 2 3 4 5 6 7 8 9
class Hello { public static void main (String[] args) { System.out.println("Oke dit werkt dus op school"); System.out.println("Dat is best wel cool."); System.out.println("Ik vraag me af of dit ook met games kan."); System.out.println("Echt wel!"); int 1, 2; 1 = 3.22; 2 = 833.32;
...
-
1
main = putStrLn "Hello, World"
-
1
map (mod 3) [1..9]
-
1
[1..9]
-
1
7 mod 3
-
1 2 3
fibs = 0 : 1 : zipWith (+) fibs (tail fibs) main = print $ fibs !! 10
-
1 2 3 4 5 6 7 8
quicksort :: Ord a => [a] -> [a] quicksort [] = [] quicksort (p:xs) = (quicksort $! lesser) ++ [p] ++ (quicksort $! greater) where lesser = (filter $! (< p)) $! xs greater = (filter $! (>= p)) $! xs main = print $ length $ quicksort [1..10000]
-
1 2 3 4 5 6 7 8
quicksort :: Ord a => [a] -> [a] quicksort ![] = [] quicksort !(p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = (filter $! (< p)) $! xs greater = (filter $! (>= p)) $! xs main = print $ length $ quicksort [1..10000]
-
1 2 3 4 5 6 7 8
quicksort :: Ord a => [a] -> [a] quicksort [] = [] quicksort !(p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = (filter $! (< p)) $! xs greater = (filter $! (>= p)) $! xs main = print $ length $ quicksort [1..10000]
-
1 2 3 4 5 6 7 8
quicksort :: Ord a => [a] -> [a] quicksort [] = [] quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = (filter (< p)) xs greater = (filter (>= p)) xs main = print $ length $ quicksort [1..10000]


