結果
| 問題 | No.1653 Squarefree |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-02 11:37:32 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 527 bytes |
| 記録 | |
| コンパイル時間 | 1,254 ms |
| コンパイル使用メモリ | 216,556 KB |
| 実行使用メモリ | 19,648 KB |
| 最終ジャッジ日時 | 2026-06-22 23:00:58 |
| 合計ジャッジ時間 | 8,152 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 37 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
map <long long int, bool> isprime;
vector <long long int> prime;
map <long long int, bool> check;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
long long int a, b;
int res = 0;
cin >> a >> b;
for (long long int i = a; i <= b; i++)
{
long long int x = sqrt(i);
bool ok = true;
for (long long int j = 2; j <= x; j++)
{
if (i % (j * j) == 0)
{
ok = false;
break;
}
}
if (ok)
{
res++;
}
}
cout << res << '\n';
return 0;
}