結果
| 問題 | No.1157 Many Quotients easy |
| ユーザー |
|
| 提出日時 | 2026-01-07 03:27:53 |
| 言語 | Standard ML (MLton 20210117) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 739 bytes |
| 記録 | |
| コンパイル時間 | 6,893 ms |
| コンパイル使用メモリ | 705,036 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-07 03:28:01 |
| 合計ジャッジ時間 | 4,693 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
fun readInt () =
valOf (TextIO.scanStream (Int.scan StringCvt.DEC) TextIO.stdIn)
val () =
let
val n = readInt ()
val isUsed = Array.array (n + 1, false)
fun findAnsAux k =
if n < k then ignore ()
else
(
Array.update (isUsed, n div k, true);
findAnsAux (k + 1)
)
fun findAns () =
(
findAnsAux 1;
Array.foldl (fn (b, acc) => if b = true then acc + 1
else acc)
0
isUsed
)
val ans = findAns ()
in
print (Int.toString ans ^ "\n")
end