結果

問題 No.167 N^M mod 10
ユーザー guriceringuricerin
提出日時 2020-01-23 12:40:01
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 874 bytes
コンパイル時間 4,645 ms
コンパイル使用メモリ 163,464 KB
実行使用メモリ 24,436 KB
最終ジャッジ日時 2023-09-26 08:56:20
合計ジャッジ時間 7,678 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 60 ms
20,200 KB
testcase_04 WA -
testcase_05 AC 58 ms
24,300 KB
testcase_06 WA -
testcase_07 AC 58 ms
22,340 KB
testcase_08 AC 57 ms
20,128 KB
testcase_09 AC 57 ms
22,156 KB
testcase_10 AC 58 ms
22,212 KB
testcase_11 WA -
testcase_12 AC 58 ms
22,256 KB
testcase_13 WA -
testcase_14 AC 58 ms
24,436 KB
testcase_15 AC 59 ms
22,276 KB
testcase_16 AC 60 ms
22,276 KB
testcase_17 AC 60 ms
22,316 KB
testcase_18 WA -
testcase_19 AC 60 ms
22,288 KB
testcase_20 WA -
testcase_21 AC 59 ms
20,312 KB
testcase_22 WA -
testcase_23 AC 61 ms
22,428 KB
testcase_24 AC 61 ms
20,236 KB
testcase_25 WA -
testcase_26 AC 60 ms
20,128 KB
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 main() =
    let n =
        read string
        |> Seq.last
        |> fun x -> Convert.ToInt32(x.ToString())

    let m =
        read string
        |> Seq.last
        |> fun x -> Convert.ToInt32(x.ToString())

    pown (float n) m
    |> fun x -> int x % 10
    |> puts
    ()

main()
writer.Close()
0