結果
| 問題 |
No.537 ユーザーID
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-06 01:22:55 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 594 bytes |
| コンパイル時間 | 328 ms |
| コンパイル使用メモリ | 37,432 KB |
| 実行使用メモリ | 32,836 KB |
| 最終ジャッジ日時 | 2024-11-06 01:22:58 |
| 合計ジャッジ時間 | 2,700 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 06 NOV 2024 01:22:55 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.006
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(s (make-hash-table))
(i 1))
(loop while (<= (* i i) n) do
(when (zerop (mod n i))
(let* ((j (floor n i))
(p (parse-integer (concatenate 'string (write-to-string i) (write-to-string j))))
(q (parse-integer (concatenate 'string (write-to-string j) (write-to-string i)))))
(setf (gethash p s) t
(gethash q s) t)))
(incf i))
(format t "~d~%" (hash-table-count s))))
(main)
Common Lisp