QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#220828#6740. Functionycccc319WA 0ms3428kbC++17654b2023-10-20 21:12:382023-10-20 21:12:38

Judging History

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

  • [2023-10-20 21:12:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3428kb
  • [2023-10-20 21:12:38]
  • 提交

answer

#include <bits/stdc++.h>
#define mod 998244353
#define ll long long
using namespace std;
ll ff[20230000];
ll fk(ll x)
{
    ll f(ll x);
    ll ans=0;
    ll tmp=min(x,20210926ll);
    for(int l=1,r=0;l<=tmp;l=r+1)
    {
        r = tmp / (tmp / l);
        if(l==1) continue;
        ans=(ans+(r-l+1)*f(x/l)%mod)%mod;
    }
    return ans;
}
ll f(ll x)
{
    if(ff[x] or x<20230000) return ff[x];
    if(x==0)
    {
        return 0;
    }
    else if(x==1)
    {
        return 1;
    }
    else
    {
        return ff[x]=(fk(x)+1)%mod;
    }
}
int main() {
    ll n;
    cin>>n;
    cout<<f(n);
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3428kb

input:

1

output:

0

result:

wrong answer 1st numbers differ - expected: '1', found: '0'