結果
問題 | No.73 helloworld |
ユーザー |
|
提出日時 | 2016-04-06 12:33:28 |
言語 | Haskell (9.10.1) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 545 bytes |
コンパイル時間 | 10,896 ms |
コンパイル使用メモリ | 173,440 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 23:57:38 |
合計ジャッジ時間 | 11,864 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 RE * 1 |
コンパイルメッセージ
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:4:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in 8 further locations. Suggested fix: Please use spaces instead. | 4 | alphabet <- getContents >>= return . map (read::String->Int) . lines | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
importData.Charmain = doalphabet <- getContents >>= return . map (read::String->Int) . lineslet num_h = alphabet!!(ord 'h' - ord 'a')let num_e = alphabet!!(ord 'e' - ord 'a')let num_l = alphabet!!(ord 'l' - ord 'a')let num_o = alphabet!!(ord 'o' - ord 'a')let num_w = alphabet!!(ord 'w' - ord 'a')let num_r = alphabet!!(ord 'r' - ord 'a')let num_d = alphabet!!(ord 'd' - ord 'a')print $ num_h * num_e * num_w * num_r * num_d * (num_o - (num_o`div`2))*(num_o`div`2) * maximum[ x*(num_l-x)*(num_l-x-1)`div`2 | x<-[1..num_l] ]