結果
| 問題 | No.1291 小手調べ |
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2026-05-22 21:41:29 |
| 言語 | Haskell (9.14.1) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 12,100 ms |
| コンパイル使用メモリ | 195,712 KB |
| 実行使用メモリ | 7,552 KB |
| 最終ジャッジ日時 | 2026-05-22 21:41:45 |
| 合計ジャッジ時間 | 10,706 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:10:7: warning: [GHC-63394] [-Wx-partial]
In the use of ‘tail’
(imported from Prelude, but defined in GHC.Internal.List):
"This is a partial function, it throws an error on empty lists. Replace it with 'drop' 1, or use pattern matching or 'GHC.Internal.Data.List.uncons' instead. Consider refactoring to use "Data.List.NonEmpty"."
|
10 | . tail
| ^^^^
[2 of 2] Linking a.out
ソースコード
module Main where
type Input = [Int]
type Output = [String]
parse :: String -> Input
parse =
map read
. tail
. lines
solve :: Input -> Output
solve =
map conv
conv :: Int -> String
conv 1 = "10"
conv n =
show (9 * 10 ^ (n - 1))
render :: Output -> String
render = unlines
main :: IO ()
main =
interact
( render
. solve
. parse
)
kou_kkk