結果
問題 | No.2480 Sequence Sum |
ユーザー |
![]() |
提出日時 | 2023-09-22 21:43:31 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 500 ms |
コード長 | 643 bytes |
コンパイル時間 | 2,809 ms |
コンパイル使用メモリ | 248,468 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-26 14:35:07 |
合計ジャッジ時間 | 3,456 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h>namespace nono {std::vector<long long> divisor(long long n) {std::vector<long long> result;for (long long i = 1; i * i <= n; i++) {if (n % i == 0) {result.push_back(i);if (i * i != n) {result.push_back(n / i);}}}return result;}void solve() {long long n;std::cin >> n;std::cout << n - divisor(n).size() << std::endl;}} // namespace nonoint main() {std::cin.tie(0)->sync_with_stdio(false);std::cout << std::fixed << std::setprecision(15);int t = 1;while (t--) nono::solve();}