結果

問題 No.395 永遠の17歳
ユーザー lvs7klvs7k
提出日時 2018-09-15 11:09:59
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 4,263 ms
コンパイル使用メモリ 160,240 KB
実行使用メモリ 7,120 KB
最終ジャッジ日時 2023-09-23 00:03:41
合計ジャッジ時間 5,504 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,980 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
7,012 KB
testcase_03 AC 2 ms
6,920 KB
testcase_04 AC 2 ms
6,988 KB
testcase_05 AC 2 ms
6,980 KB
testcase_06 WA -
testcase_07 AC 2 ms
6,924 KB
testcase_08 AC 3 ms
6,944 KB
testcase_09 WA -
testcase_10 AC 3 ms
6,936 KB
testcase_11 AC 2 ms
6,912 KB
testcase_12 AC 3 ms
7,120 KB
testcase_13 AC 2 ms
6,984 KB
testcase_14 AC 3 ms
6,984 KB
testcase_15 AC 2 ms
6,976 KB
testcase_16 AC 3 ms
6,924 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 #

module Main where

import Control.Monad

to10 :: Int -> Int
to10 x = (1 * x ^ 1) + (7 * x ^ 0)

main :: IO ()
main = do
    a <- readLn :: IO Int
    let bs = filter ((== a) . to10) $ [2 .. 100]
    if null bs
        then print (-1)
        else print $ head bs
0