結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-04-20 10:23:14 | 
| 言語 | Haskell  (9.10.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 70 ms / 1,000 ms | 
| コード長 | 414 bytes | 
| コンパイル時間 | 9,106 ms | 
| コンパイル使用メモリ | 180,048 KB | 
| 実行使用メモリ | 25,856 KB | 
| 最終ジャッジ日時 | 2024-07-19 20:36:26 | 
| 合計ジャッジ時間 | 10,230 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as B
rInt :: B.ByteString -> Int
rInt = fst . fromJust . B.readInt
modm a = a `mod` 1000000007
productcd cds = modm (x * y)
    where
        x = modm $ div ((cds !! 0) + 1) 2
        y = modm (cds !! 1)
main = do
    n <- readLn
    xs <- map (productcd . (map rInt . B.words)) <$> replicateM n B.getLine
    print $ modm $ sum xs