結果
問題 | No.167 N^M mod 10 |
ユーザー | guricerin |
提出日時 | 2020-01-23 12:43:13 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 928 bytes |
コンパイル時間 | 3,551 ms |
コンパイル使用メモリ | 164,064 KB |
実行使用メモリ | 26,388 KB |
最終ジャッジ日時 | 2023-09-26 09:02:03 |
合計ジャッジ時間 | 6,650 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 60 ms
22,328 KB |
testcase_01 | AC | 59 ms
22,228 KB |
testcase_02 | WA | - |
testcase_03 | AC | 61 ms
24,196 KB |
testcase_04 | AC | 59 ms
22,276 KB |
testcase_05 | AC | 60 ms
24,444 KB |
testcase_06 | AC | 59 ms
22,324 KB |
testcase_07 | AC | 60 ms
24,388 KB |
testcase_08 | AC | 61 ms
24,312 KB |
testcase_09 | AC | 60 ms
22,288 KB |
testcase_10 | AC | 61 ms
22,300 KB |
testcase_11 | WA | - |
testcase_12 | AC | 60 ms
22,232 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 59 ms
22,248 KB |
testcase_16 | AC | 61 ms
22,388 KB |
testcase_17 | AC | 59 ms
22,240 KB |
testcase_18 | WA | - |
testcase_19 | AC | 60 ms
24,296 KB |
testcase_20 | WA | - |
testcase_21 | AC | 60 ms
22,180 KB |
testcase_22 | WA | - |
testcase_23 | AC | 60 ms
22,280 KB |
testcase_24 | AC | 61 ms
22,248 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 61 ms
22,244 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
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()) if m = 0 then puts n else pown (float n) m |> fun x -> int x % 10 |> puts () main() writer.Close()