QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#412126#3161. Another Coin Weighing Puzzlelittlecat#WA 0ms3736kbC++14259b2024-05-16 08:47:072024-05-16 08:47:07

Judging History

This is the latest submission verdict.

  • [2024-05-16 08:47:07]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3736kb
  • [2024-05-16 08:47:07]
  • Submitted

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'