結果
| 問題 |
No.2795 Perfect Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-28 21:25:19 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 732 bytes |
| コンパイル時間 | 3,110 ms |
| コンパイル使用メモリ | 274,336 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-06-28 21:25:26 |
| 合計ジャッジ時間 | 6,518 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 1 -- * 32 |
ソースコード
#pragma optimise "i'll_die_virgin"
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
#if __cplusplus >= 202002L
using namespace numbers;
#endif
int32_t main(){
cin.tie(0)->sync_with_stdio(0);
//freopen("err.txt","w",stderr);
cin.exceptions(ios::badbit | ios::failbit);
auto __solve_tc = [&](auto __tc_num)->void{
int n;
cin>>n;
int cnt =0;
for(int i =1 ; i+i<=n; i++)if(n%i == 0)cnt+=i;
if(cnt == n)
cout<<"Yes"<<endl;
else cout<<"No"<<endl;
};
int __tc_cnt = 1;
// cin >> __tc_cnt;
for(auto __tc_num = 0; __tc_num < __tc_cnt; ++ __tc_num){
__solve_tc(__tc_num);
}
return 0;
}
/*
*/