結果

問題 No.671 1000000007
ユーザー taktak
提出日時 2018-06-18 00:17:27
言語 F#
(.NET 7)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 3,920 ms
コンパイル使用メモリ 149,408 KB
実行使用メモリ 26,700 KB
最終ジャッジ日時 2023-09-13 06:33:58
合計ジャッジ時間 5,595 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
26,700 KB
testcase_01 AC 77 ms
22,608 KB
testcase_02 AC 77 ms
22,604 KB
testcase_03 AC 77 ms
22,608 KB
testcase_04 AC 77 ms
22,764 KB
testcase_05 AC 76 ms
22,608 KB
testcase_06 AC 76 ms
22,868 KB
testcase_07 AC 77 ms
22,664 KB
testcase_08 AC 76 ms
22,676 KB
testcase_09 AC 79 ms
24,660 KB
testcase_10 AC 77 ms
22,532 KB
testcase_11 AC 76 ms
24,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let zeroCount (str:string) =
    str.ToCharArray()
    |> Array.where(fun c -> c = '0')
    |> Array.length

let roleModel = "1000000007"
let roleModel'sZeroCnt = roleModel |> zeroCount

let N = stdin.ReadLine()
let N'sZeroCnt = N |> zeroCount

abs(roleModel'sZeroCnt - N'sZeroCnt) |> printfn "%i"
0