結果

問題 No.2795 Perfect Number
ユーザー june19312
提出日時 2024-06-28 22:36:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 195 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 62,848 KB
最終ジャッジ日時 2024-06-28 22:36:47
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 1 TLE * 1 -- * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 1
for i in range(2,int(N**0.5)+1):
    if N%i == 0:
        ans += i
        if N//i != i:
            ans += N//i
if ans == N:
    print("Yes")
else:
    print("No")
    
0