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){
}
if(i%b==0){
cnt=cnt*499122177%mod;
}
}
cout<<cnt;
return 0;
}
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC
@qhxAC