捞
  • 板块灌水区
  • 楼主Emplace
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/6/2 18:22
  • 上次更新2024/6/2 21:04:41
查看原帖
捞
745865
Emplace楼主2024/6/2 18:22

P9577 「Cfz Round 1」Dead Cells

#include<bits/stdc++.h>
using namespace std;
const long long mod=998244353;
long long a,b,k;
int main(){
    cin>>a>>b>>k;
    long long cnt=1;
    for(int i=1;i<=k;i++){
		if(i%a==0){
			//cnt=(cnt*2)%mod;
			//cout<<cnt;
		}
		if(i%b==0){
			cnt=cnt*499122177%mod;
		}
	}
	cout<<cnt;
	return 0;
}

@qhxAC

@qhxAC @qhxAC

@qhxAC

@qhxAC

@qhxAC

@qhxAC

@qhxAC

@qhxAC

@qhxAC

@qhxAC

2024/6/2 18:22
加载中...