結果

問題 No.2246 1333-like Number
ユーザー natoriusannatoriusan
提出日時 2023-08-01 15:12:37
言語 F#
(F# 4.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 10,880 ms
コンパイル使用メモリ 191,056 KB
実行使用メモリ 30,848 KB
最終ジャッジ日時 2024-04-19 14:27:45
合計ジャッジ時間 11,414 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
30,332 KB
testcase_01 AC 64 ms
30,556 KB
testcase_02 AC 61 ms
30,464 KB
testcase_03 AC 63 ms
30,336 KB
testcase_04 AC 64 ms
30,696 KB
testcase_05 AC 63 ms
30,720 KB
testcase_06 AC 63 ms
30,592 KB
testcase_07 AC 62 ms
30,720 KB
testcase_08 AC 62 ms
30,592 KB
testcase_09 AC 63 ms
30,848 KB
testcase_10 AC 65 ms
30,716 KB
testcase_11 AC 63 ms
30,592 KB
testcase_12 AC 63 ms
30,592 KB
testcase_13 AC 62 ms
30,324 KB
testcase_14 AC 62 ms
30,464 KB
testcase_15 AC 62 ms
30,464 KB
testcase_16 AC 79 ms
30,592 KB
testcase_17 AC 60 ms
30,592 KB
testcase_18 AC 62 ms
30,720 KB
testcase_19 AC 61 ms
30,720 KB
testcase_20 AC 81 ms
30,588 KB
testcase_21 AC 64 ms
30,720 KB
testcase_22 AC 63 ms
30,592 KB
testcase_23 AC 65 ms
30,580 KB
testcase_24 AC 64 ms
30,580 KB
testcase_25 AC 63 ms
30,336 KB
testcase_26 AC 64 ms
30,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (441 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let n = stdin.ReadLine () |> int

let digits = if n % 36 = 0 then n / 36 - 1 else n / 36
let num = if n % 36 = 0 then 36 else n % 36

let mutable b_head = ""
let mutable n_count = num
for i = 8 downto 1 do
    if b_head = "" && n_count - i <= 0 then
        b_head <- (string (9-i)) + (string (9-i+n_count))
    
    n_count <- n_count - i
    
b_head + String.replicate digits (string b_head.[1]) |> printfn "%s"
0