結果
問題 | No.2480 Sequence Sum |
ユーザー |
![]() |
提出日時 | 2023-09-23 01:26:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 500 ms |
コード長 | 435 bytes |
コンパイル時間 | 244 ms |
コンパイル使用メモリ | 41,028 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-26 14:41:28 |
合計ジャッジ時間 | 823 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
/* -*- coding: utf-8 -*- * * 2480.cc: No.2480 Sequence Sum - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); int c = 0; for (int p = 1; p * p <= n; p++) if (n % p == 0) { int q = n / p; c += (p != q) ? 2 : 1; } printf("%d\n", n - c); return 0; }