QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#657936 | #7735. Primitive Root | miluosi | WA | 0ms | 3648kb | C++14 | 581b | 2024-10-19 15:48:22 | 2024-10-19 15:48:25 |
Judging History
answer
#include<iostream>
#include<unordered_map>
#include<vector>
#include<algorithm>
#include<string>
#include<math.h>
#include<map>
#include<set>
#include<string.h>
#include<iomanip>
#include<queue>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> PII;
//int mod = 998244353;
int main()
{
int t;
cin >> t;
while (t--)
{
ull p, m;
cin >> p >> m;
ull k = 0,ans=0;
for (k = 0;k*p+1<=m ; k++)
{
if (((k * p + 1) ^ (p - 1)) <= m)
{
ans++;
}
}
cout << ans << endl;
}
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3648kb
input:
3 2 0 7 11 1145141 998244353
output:
0 1 872
result:
wrong answer 1st lines differ - expected: '1', found: '0'