結果
問題 |
No.1514 Squared Matching
|
ユーザー |
![]() |
提出日時 | 2021-05-21 22:42:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 684 ms |
コンパイル使用メモリ | 67,896 KB |
最終ジャッジ日時 | 2025-01-21 15:52:11 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 26 |
ソースコード
#include <bitset> #include <iostream> int main() { int n; std::cin >> n; std::bitset<50000001> used; long ans = 0; for (int i = 1; i <= n; ++i) { if (used[i]) continue; long size = 0; for (long j = 1; j * j * i < n; ++j) { used[j * j * i] = 1; ++size; } ans += size * size; } std::cout << ans << "\n"; }