結果
| 問題 |
No.747 循環小数N桁目 Hard
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-12-10 18:04:23 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 2,000 ms |
| コード長 | 369 bytes |
| コンパイル時間 | 6,049 ms |
| コンパイル使用メモリ | 172,160 KB |
| 実行使用メモリ | 18,048 KB |
| 最終ジャッジ日時 | 2024-09-16 15:55:53 |
| 合計ジャッジ時間 | 10,790 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 120 |
コンパイルメッセージ
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
ソースコード
main = do
e<-getLine
e2<-getLine
let x=read e::Integer
y=read e2::Integer
ds=[[0,0,0,0,0,0,0],[1,3,1,3,1,3,1],[2,2,2,2,2,2],[3,3,3,3,3,3],[4,0,4,0,4,0],[5,5,5,5,5,5]]
ts=ds!!(fromIntegral((x-1) `mod` 6)::Int)
ts2=ts!!(fromIntegral((y-1) `mod` 6)::Int)
ans=[2,8,5,7,1,4]!!ts2
print $ ans
horiesiniti