language: Haskell (ghc-6.8.2)
date: 111 days 23 hours ago
link:
可見度: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Data.Array
import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Control.Applicative
import Control.Monad.ST
 
ary_fact = listArray (0,500) fact
 where fact = 1:zipWith (*) [1..] fact
 
main = do
   Just (t, _) <- BS.readInt <$> BS.getLine
   replicateM_ t $ do
      BS.getLine