結果

問題 No.525 二度寝の季節
ユーザー guriceringuricerin
提出日時 2020-01-10 14:44:47
言語 F#
(F# 4.0)
結果
AC  
実行時間 85 ms / 1,000 ms
コード長 1,029 bytes
コンパイル時間 5,121 ms
コンパイル使用メモリ 163,700 KB
実行使用メモリ 24,968 KB
最終ジャッジ日時 2023-08-15 14:25:35
合計ジャッジ時間 8,432 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
22,940 KB
testcase_01 AC 83 ms
24,800 KB
testcase_02 AC 83 ms
22,772 KB
testcase_03 AC 82 ms
22,952 KB
testcase_04 AC 83 ms
22,816 KB
testcase_05 AC 83 ms
22,888 KB
testcase_06 AC 83 ms
22,752 KB
testcase_07 AC 83 ms
22,812 KB
testcase_08 AC 83 ms
24,852 KB
testcase_09 AC 83 ms
24,756 KB
testcase_10 AC 83 ms
24,912 KB
testcase_11 AC 83 ms
22,940 KB
testcase_12 AC 83 ms
24,820 KB
testcase_13 AC 83 ms
22,812 KB
testcase_14 AC 83 ms
24,864 KB
testcase_15 AC 84 ms
22,828 KB
testcase_16 AC 84 ms
24,968 KB
testcase_17 AC 84 ms
24,824 KB
testcase_18 AC 83 ms
22,988 KB
testcase_19 AC 83 ms
22,760 KB
testcase_20 AC 83 ms
22,828 KB
testcase_21 AC 84 ms
22,804 KB
testcase_22 AC 83 ms
24,860 KB
testcase_23 AC 83 ms
22,836 KB
testcase_24 AC 84 ms
24,940 KB
testcase_25 AC 83 ms
22,776 KB
testcase_26 AC 84 ms
22,932 KB
testcase_27 AC 84 ms
22,752 KB
testcase_28 AC 84 ms
24,864 KB
testcase_29 AC 84 ms
22,772 KB
testcase_30 AC 84 ms
24,844 KB
testcase_31 AC 83 ms
22,920 KB
testcase_32 AC 83 ms
24,856 KB
testcase_33 AC 85 ms
24,852 KB
testcase_34 AC 84 ms
24,820 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System
open System.Collections.Generic

[<AutoOpen>]
module Cin =
    let read f = stdin.ReadLine() |> f
    let reada f = stdin.ReadLine().Split() |> Array.map f
    let readChars() = read string |> Seq.toArray
    let readInts() = readChars() |> Array.map (fun x -> Convert.ToInt32(x.ToString()))

[<AutoOpen>]
module Cout =
    let writer = new IO.StreamWriter(new IO.BufferedStream(Console.OpenStandardOutput()))
    let print (s: string) = writer.Write s
    let println (s: string) = writer.WriteLine s
    let inline puts (s: ^a) = string s |> println

let solve() =
    let s = read string |> fun x -> x.Split(':')
    let h = Convert.ToInt32(s.[0]) * 60
    let m = Convert.ToInt32(s.[1])

    let hm = (h + m + 5) % (24 * 60)
    let h = hm / 60
    let m = hm % 60
    let h = h.ToString("D2")
    let m = m.ToString("D2")
    sprintf "%s:%s" h m |> puts
    ()

[<EntryPoint>]
let main _ =
    try
        solve()
    with e -> printfn "%s" (e.ToString())
    writer.Close()
    0 // return an integer exit code
0