結果

問題 No.888 約数の総和
ユーザー ducktailducktail
提出日時 2019-09-20 22:01:26
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 13,916 KB
最終ジャッジ日時 2023-10-12 19:08:18
合計ジャッジ時間 2,773 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,796 KB
testcase_01 AC 18 ms
11,664 KB
testcase_02 AC 17 ms
11,820 KB
testcase_03 WA -
testcase_04 AC 17 ms
11,716 KB
testcase_05 WA -
testcase_06 AC 17 ms
11,716 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 18 ms
11,816 KB
testcase_10 WA -
testcase_11 AC 17 ms
11,716 KB
testcase_12 AC 17 ms
11,792 KB
testcase_13 AC 18 ms
11,812 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 17 ms
11,868 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 70 ms
11,660 KB
testcase_20 WA -
testcase_21 AC 87 ms
11,856 KB
testcase_22 AC 88 ms
11,696 KB
testcase_23 WA -
testcase_24 AC 45 ms
13,876 KB
testcase_25 WA -
testcase_26 AC 55 ms
11,788 KB
testcase_27 AC 71 ms
11,712 KB
testcase_28 AC 73 ms
11,660 KB
testcase_29 WA -
testcase_30 AC 75 ms
11,772 KB
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (divisor n)
  (let loop ([i 1]
             [l '()])
    (cond [(> (* i i) n) l]
          [(zero? (remainder n i)) (loop (+ i 1) (cons i (cons (quotient n i) l)))]
          [else (loop (+ i 1) l)])))

(define (solve n)
  (apply + (divisor n)))

(define (main args)
  (let ([n (read)])
    (print (solve n)))
  0)
0