QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#181185#3161. Another Coin Weighing Puzzlewarwolf#WA 0ms3948kbC++20312b2023-09-16 16:25:112023-09-16 16:25:12

Judging History

你现在查看的是最新测评结果

  • [2023-09-16 16:25:12]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3948kb
  • [2023-09-16 16:25:11]
  • 提交

answer

#include <bits/stdc++.h>
#define maxn 100086

using namespace std;

int m, k;
const int p = 998244353;

int main(){
	scanf("%d%d", &m, &k);
	int ans = 1;
	for(int i = 1;i <= m;i++) ans = 1ll * ans * 3 % p;
	ans = (ans + p - 1) % p;
	ans = 1ll * ans * min(m, k) % p;
	printf("%d", (ans + 1) % p);
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3856kb

input:

2 1

output:

9

result:

ok single line: '9'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3948kb

input:

2 2

output:

17

result:

ok single line: '17'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3856kb

input:

10000 10000

output:

55422034

result:

wrong answer 1st lines differ - expected: '689223145', found: '55422034'