結果
問題 | No.2246 1333-like Number |
ユーザー |
|
提出日時 | 2023-08-01 15:12:37 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 75 ms / 2,000 ms |
コード長 | 413 bytes |
コンパイル時間 | 8,435 ms |
コンパイル使用メモリ | 191,064 KB |
実行使用メモリ | 30,848 KB |
最終ジャッジ日時 | 2024-10-11 06:47:40 |
合計ジャッジ時間 | 10,714 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (240 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/
ソースコード
let n = stdin.ReadLine () |> intlet digits = if n % 36 = 0 then n / 36 - 1 else n / 36let num = if n % 36 = 0 then 36 else n % 36let mutable b_head = ""let mutable n_count = numfor i = 8 downto 1 doif b_head = "" && n_count - i <= 0 thenb_head <- (string (9-i)) + (string (9-i+n_count))n_count <- n_count - ib_head + String.replicate digits (string b_head.[1]) |> printfn "%s"