Submission #1177385


Source Code Expand

main :: IO ()
main = do
    line <- getLine
    putStrLn $ solve line

solve :: String -> String
solve line = show n
    where
        x = read line :: Int
        n = 2 * k + m + 1
        k = (x - 1) `div` 11
        m = maybePlusOne x

maybePlusOne :: Int -> Int
maybePlusOne x
    | (x-1) `mod` 11 < 6    = 0
    | otherwise             = 1

Submission Info

Submission Time
Task C - X: Yet Another Die Game
User ykarako
Language Haskell (GHC 7.10.3)
Score 300
Code Size 362 Byte
Status AC
Exec Time 1 ms
Memory 508 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 18
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
All 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 1 ms 380 KB
00_example_02.txt AC 1 ms 508 KB
01.txt AC 1 ms 380 KB
02.txt AC 1 ms 380 KB
03.txt AC 1 ms 508 KB
04.txt AC 1 ms 508 KB
05.txt AC 1 ms 508 KB
06.txt AC 1 ms 508 KB
07.txt AC 1 ms 508 KB
08.txt AC 1 ms 508 KB
09.txt AC 1 ms 380 KB
10.txt AC 1 ms 380 KB
11.txt AC 1 ms 380 KB
12.txt AC 1 ms 508 KB
13.txt AC 1 ms 508 KB
14.txt AC 1 ms 508 KB
15.txt AC 1 ms 508 KB
16.txt AC 1 ms 508 KB