結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-29 15:01:10 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 304 bytes |
| コンパイル時間 | 3,743 ms |
| コンパイル使用メモリ | 173,696 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 06:45:52 |
| 合計ジャッジ時間 | 3,903 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:5:1: warning: [GHC-94817] [-Wtabs]
Tab character found here, and in five further locations.
Suggested fix: Please use spaces instead.
|
5 | inputs<-fmap (read.T.unpack)<$>T.split (==' ')<$>T.pack<$>getLine::IO [Integer]
| ^^^^^^^^
[2 of 2] Linking a.out
ソースコード
import qualified Data.Text as T import Control.Applicative import Data.Bits main = do inputs<-fmap (read.T.unpack)<$>T.split (==' ')<$>T.pack<$>getLine::IO [Integer] let f0=inputs!!0 let f1=inputs!!1 let n =inputs!!2 let n_m=n `mod` 3 print$if n_m==0 then f0 else if n_m==1 then f1 else f0 `xor` f1