結果
| 問題 |
No.2795 Perfect Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-28 21:23:34 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 730 bytes |
| コンパイル時間 | 4,710 ms |
| コンパイル使用メモリ | 273,432 KB |
| 実行使用メモリ | 13,764 KB |
| 最終ジャッジ日時 | 2024-06-28 21:23:42 |
| 合計ジャッジ時間 | 8,163 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 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<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;
}
/*
*/