結果
| 問題 |
No.2795 Perfect Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-28 22:02:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 232 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 16,256 KB |
| 最終ジャッジ日時 | 2024-06-28 22:02:22 |
| 合計ジャッジ時間 | 3,850 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 1 -- * 32 |
ソースコード
n = int(input())
ans = set()
for i in range(1, n):
if i % i > n:
break
if n % i == 0:
ans.add(i)
if i * i != n:
ans.add(n // i)
if sum(ans) == n*2:
print('Yes')
else:
print('No')