General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
95480622 Practice:
zkdxl
1265E - 20 C++17 (GCC 9-64) Accepted 78 ms 4712 KB 2020-10-14 09:56:19 2020-10-14 09:56:19
→ Source
//xtwakioi! xtwddYnoi(双重含义)!
#include <bits/stdc++.h>
#define ri register
#define int long long
#define E (n+1)
#define mk make_pair
using namespace std; const int N=200010, Mod=998244353;
inline int read()
{
    int s=0, w=1; ri char ch=getchar();
    while(ch<'0'||ch>'9') { if(ch=='-') w=-1; ch=getchar(); }
    while(ch>='0'&&ch<='9') s=(s<<3)+(s<<1)+(ch^48), ch=getchar();
    return s*w;
}
int n,a[N],dp[N],qz[N];
inline int ksc(int x,int p) { int tt=1; for(;p;p>>=1, x=x*x%Mod) if(p&1ll) tt=tt*x%Mod; return tt; }
signed main()
{
	n=read();
    for(ri int i=1;i<=n;i++) a[i]=read();
    //正向
    for(ri int i=1;i<=n;i++)
    {
        dp[i]=(dp[i-1]+1)*ksc(a[i],Mod-2)%Mod*100%Mod;
    }
    printf("%lld\n",dp[n]);
    //反向
    /*qz[0]=1;
    for(ri int i=1;i<=n;i++) qz[i]=qz[i-1]*a[i]%Mod*ksc(100,Mod-2)%Mod;
    int qwq=0;
    for(ri int i=0;i<n;i++) qwq=(qwq+qz[i])%Mod;
    printf("%lld\n",qwq*ksc(qz[n],Mod-2)%Mod);*/
    return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details