結果
| 問題 | No.537 ユーザーID | 
| コンテスト | |
| ユーザー |  wonda_t_coffee | 
| 提出日時 | 2020-02-04 09:26:40 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 195 bytes | 
| コンパイル時間 | 83 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 22,784 KB | 
| 最終ジャッジ日時 | 2024-09-19 20:29:05 | 
| 合計ジャッジ時間 | 5,484 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 19 WA * 13 | 
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.chomp.to_i if n == 1 puts 1 exit end ans = 0 lim = (n**0.5).to_i (1..lim).to_a.each do |d| next if n % d > 0 ans += 2 end ans -= 1 if n % lim == 0 && lim == n / lim puts ans
