結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2015-10-20 21:31:45 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 367 bytes |
コンパイル時間 | 3,770 ms |
コンパイル使用メモリ | 171,648 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 11:06:31 |
合計ジャッジ時間 | 4,290 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
コンパイルメッセージ
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
ソースコード
generateIchimatsu::String->StringgenerateIchimatsu (w : h : c : _)| c == "B" = generateIchimatsu' ["BW", "WB"]| otherwise = generateIchimatsu' ["WB", "BW"]where[w', h'] = map read [w, h]generateIchimatsu' = unlines . take h' . cycle . map (take w' . cycle)main::IO()main = putStr . generateIchimatsu . words =<< getLine