結果

問題 No.73 helloworld
ユーザー HaarHaar
提出日時 2016-04-06 12:33:28
言語 Haskell
(9.8.2)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 545 bytes
コンパイル時間 13,531 ms
コンパイル使用メモリ 162,396 KB
実行使用メモリ 7,376 KB
最終ジャッジ日時 2023-08-22 21:39:20
合計ジャッジ時間 14,288 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,164 KB
testcase_01 AC 3 ms
7,080 KB
testcase_02 AC 3 ms
7,116 KB
testcase_03 AC 2 ms
7,144 KB
testcase_04 AC 3 ms
7,184 KB
testcase_05 AC 3 ms
7,264 KB
testcase_06 AC 2 ms
7,100 KB
testcase_07 AC 2 ms
7,236 KB
testcase_08 AC 3 ms
7,156 KB
testcase_09 AC 2 ms
7,120 KB
testcase_10 AC 3 ms
7,228 KB
testcase_11 AC 3 ms
7,172 KB
testcase_12 RE -
testcase_13 AC 3 ms
7,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/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

ソースコード

diff #

import Data.Char

main = do
	alphabet <- getContents >>= return . map (read::String->Int) . lines
	let 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] ]
0