結果
問題 | No.53 悪の漸化式 |
ユーザー |
|
提出日時 | 2016-03-15 11:18:58 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 408 bytes |
コンパイル時間 | 4,095 ms |
コンパイル使用メモリ | 173,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 06:34:05 |
合計ジャッジ時間 | 5,002 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
コンパイルメッセージ
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:11:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in two further locations. Suggested fix: Please use spaces instead. | 11 | n<-getLine>>=return.(read::String->Integer) | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
importData.Ratiomatrixproduct::Numa=>aaaa->aaaa->aaaamatrixproduct (a,b,c,d) (w,x,y,z) = (a*w+b*y,a*x+b*z,c*w+d*y,c*x+d*z)matrixpower::Numa=>aaaa->Integer->aaaamatrixpower _ 0 = (1,0,0,1)matrixpower m n = (matrixproduct (matrixpower m (n-1)) m)main = don<-getLine>>=return.(read::String->Integer)let (a,b,c,d) = matrixpower (19%4,-3,1,0) nprint$fromRational$c*3+d*4