結果
問題 |
No.2795 Perfect Number
|
ユーザー |
|
提出日時 | 2024-06-28 22:33:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 226 bytes |
コンパイル時間 | 1,933 ms |
コンパイル使用メモリ | 165,784 KB |
実行使用メモリ | 13,760 KB |
最終ジャッジ日時 | 2024-06-28 22:33:50 |
合計ジャッジ時間 | 4,723 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 TLE * 1 -- * 32 |
ソースコード
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(){ int n; cin>>n; int sum = 0; for(int i=1;i<=n;i++){ if(n%i==0) sum+=i; } if(sum==2*n)cout<<"Yes"; else cout<<"No"; }