結果
問題 | No.300 平方数 |
ユーザー |
![]() |
提出日時 | 2016-04-05 18:37:59 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 412 bytes |
コンパイル時間 | 3,651 ms |
コンパイル使用メモリ | 68,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 13:30:51 |
合計ジャッジ時間 | 5,242 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(8, 14) Warning: Deprecated since v1.4; it was more confusing than useful, use `[]=`; add is deprecated [Deprecated] /home/judge/data/code/Main.nim(13, 12) Warning: Deprecated since v1.4; it was more confusing than useful, use `[]=`; add is deprecated [Deprecated]
ソースコード
import strutils, math, tablesvarX = stdin.readline.parseBiggestIntdivisors = initTable[int64, int]()for i in 2..X.float.sqrt.int+1:if X mod i.int64 == 0:divisors.add(i.int64, 0)while X mod i.int64 == 0:divisors[i.int64].incX = X div i.int64if X > 1:divisors.add(X, 1)var ans = 1.int64for p in pairs(divisors):var (k, v) = pif v mod 2 == 1:ans *= kecho(ans)