QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#288060#5. 在线 O(1) 逆元ScapeGoatTree0 0ms0kbC++14274b2023-12-21 17:34:232024-11-05 21:56:28

Judging History

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

  • [2024-11-05 21:56:28]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-12-21 17:34:25]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-12-21 17:34:23]
  • 提交

answer

#include "inv.h"
//#define int long long
const int MOD=998244353;
const int MAXN=1e8+5;
int inv1[MAXN];
void init(int p){
	inv1[1]=1;
	for(int i=2;i<=MAXN;i++){
		int k=p/i;
		int r=p%i;
		inv1[i]=1ll*(p-k)*inv1[r]%MOD;
	}
}
int inv(int x){
	return inv1[x];
}

詳細信息


Pretests


Final Tests

Test #1:

score: 0
Runtime Error

Test #2:

score: 0
Runtime Error

Test #3:

score: 0
Runtime Error

Test #4:

score: 0
Runtime Error

Test #5:

score: 0
Runtime Error