結果
問題 | No.2480 Sequence Sum |
ユーザー |
|
提出日時 | 2024-04-06 13:56:48 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 500 ms |
コード長 | 512 bytes |
コンパイル時間 | 4,346 ms |
コンパイル使用メモリ | 265,908 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 03:50:03 |
合計ジャッジ時間 | 4,550 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll = long long;using ld = long double;using mint = modint998244353;ll N;vector<ll> divisor(ll N) {vector<ll> res;for (ll i = 1; i * i <= N; i++) {if (N % i == 0) {res.push_back(i);if (i * i != N) res.push_back(N / i);}}sort(res.begin(), res.end());return res;}int main() {cin >> N;vector<ll> divs = divisor(N);cout << N - divs.size() << endl;return 0;}