QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#412126 | #3161. Another Coin Weighing Puzzle | littlecat# | WA | 0ms | 3736kb | C++14 | 259b | 2024-05-16 08:47:07 | 2024-05-16 08:47:07 |
Judging History
answer
#include <iostream>
using namespace std;
typedef long long ll;
const ll mod=998244353;
ll pow(ll x, int e) {if(!e) return 1; return (pow(x,e-1)*x)%mod;}
int main()
{
int n,k; cin>>n>>k;
cout<<(pow(2*k+1,n)-pow(2*(k/2)+1,n)+1+mod)%mod<<'\n';
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3652kb
input:
2 1
output:
9
result:
ok single line: '9'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
2 2
output:
17
result:
ok single line: '17'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3736kb
input:
10000 10000
output:
787184613
result:
wrong answer 1st lines differ - expected: '689223145', found: '787184613'