結果
問題 |
No.3296 81-like number
|
ユーザー |
![]() |
提出日時 | 2025-08-17 13:29:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 1,556 ms |
コンパイル使用メモリ | 194,864 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-17 14:00:08 |
合計ジャッジ時間 | 2,343 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 RE * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; int main(){ ll n,sum=0; cin >> n; if(n<=2||10000000000<n) return 1; for(ll x=2;x*x<=n;x++){ ll y=2; while(0<x%y&&y*y<=x) y++; if(y<x&&x%y==0) continue; ll k=x*x; while(k<=n){ sum+=k; k*=x; } } cout << sum << endl; }