結果
問題 | No.2480 Sequence Sum |
ユーザー |
![]() |
提出日時 | 2023-09-22 21:55:25 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 500 ms |
コード長 | 461 bytes |
コンパイル時間 | 3,296 ms |
コンパイル使用メモリ | 250,744 KB |
最終ジャッジ日時 | 2025-02-17 00:36:47 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; using namespace chrono; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif int main() { int64_t n; cin >> n; int64_t ans = n; for (int64_t i = 1; i * i <= n; i++) { if (n % i == 0) { ans--; if (i != n / i) { ans--; } } } cout << ans << endl; return 0; }