結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-10-09 22:51:17 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 218 bytes |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 25,600 KB |
| 実行使用メモリ | 21,632 KB |
| 最終ジャッジ日時 | 2024-10-09 22:51:21 |
| 合計ジャッジ時間 | 1,216 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 09 OCT 2024 10:51:20 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.003
ソースコード
; 自然数 1 から n までの和は n * (n + 1) / 2 で求まる
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(ans (floor (* n (1+ n)) 2)))
(princ ans)
(terpri)))
(main)
Common Lisp