結果
| 問題 | No.2246 1333-like Number |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-01 15:12:37 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 2,000 ms |
| コード長 | 413 bytes |
| 記録 | |
| コンパイル時間 | 6,923 ms |
| コンパイル使用メモリ | 208,980 KB |
| 実行使用メモリ | 32,816 KB |
| 最終ジャッジ日時 | 2026-04-27 13:44:01 |
| 合計ジャッジ時間 | 9,606 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (209 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
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"