結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー chike_pluschike_plus
提出日時 2019-03-28 16:53:28
言語 F#
(F# 4.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 494 bytes
コンパイル時間 10,466 ms
コンパイル使用メモリ 198,564 KB
実行使用メモリ 29,312 KB
最終ジャッジ日時 2024-04-21 07:41:03
合計ジャッジ時間 12,920 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
29,184 KB
testcase_01 AC 59 ms
29,312 KB
testcase_02 AC 57 ms
29,184 KB
testcase_03 AC 57 ms
29,056 KB
testcase_04 AC 56 ms
29,056 KB
testcase_05 AC 56 ms
29,056 KB
testcase_06 AC 58 ms
29,056 KB
testcase_07 AC 57 ms
29,184 KB
testcase_08 AC 57 ms
29,184 KB
testcase_09 AC 59 ms
29,184 KB
testcase_10 AC 57 ms
29,312 KB
testcase_11 AC 56 ms
29,048 KB
testcase_12 AC 56 ms
29,184 KB
testcase_13 AC 57 ms
29,184 KB
testcase_14 AC 57 ms
29,056 KB
testcase_15 AC 58 ms
29,056 KB
testcase_16 AC 59 ms
28,924 KB
testcase_17 AC 59 ms
29,184 KB
testcase_18 AC 58 ms
29,052 KB
testcase_19 AC 56 ms
29,184 KB
testcase_20 AC 56 ms
29,184 KB
testcase_21 AC 56 ms
29,164 KB
testcase_22 AC 58 ms
29,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (281 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(8,23): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '(_,0)' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let ``No.756 チャンパーノウン定数 (1)``() =

  let rec loop n i =
    let len = (string n).Length

    match (i <= len) with
    | false -> loop (n+1) (i-len)
    | true  -> match  i , len with
               | 1 , 1 -> n
               | 1 , 2 -> n / 10
               | 1 , 3 -> 1
               | 2 , 2 -> n % 10
               | 2 , 3 -> 0
               | 3 , 3 -> 1

  stdin.ReadLine()|>int
  |> loop 1
  |> stdout.WriteLine

  ()
``No.756 チャンパーノウン定数 (1)``()
0