結果

問題 No.661 ハローキティはりんご3個分
ユーザー e7a894e7a894
提出日時 2018-05-24 09:11:37
言語 Haskell
(9.6.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 860 ms
コンパイル使用メモリ 156,328 KB
実行使用メモリ 7,340 KB
最終ジャッジ日時 2023-09-11 02:12:14
合計ジャッジ時間 1,319 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,224 KB
testcase_01 AC 3 ms
7,340 KB
testcase_02 AC 2 ms
7,220 KB
testcase_03 AC 2 ms
7,108 KB
testcase_04 AC 2 ms
7,168 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 )
[2 of 2] Linking a.out

ソースコード

diff #

import Control.Monad

main = do
  i <- readLn :: IO Int
  ns <- replicateM i getLine
  mapM (putStrLn . conv . read) ns

conv :: Int -> String
conv x
  | x `mod` (lcm 8 10) == 0 = "ikisugi"
  | x `mod` 8 == 0 = "iki"
  | x `mod` 10 == 0 = "sugi"
  | otherwise = show $ x `div` 3
0