QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#129242#6740. FunctionNicolas125841TL 0ms0kbC++17555b2023-07-22 11:37:592023-07-22 11:38:02

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-22 11:38:02]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:0kb
  • [2023-07-22 11:37:59]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const ll mod = 998244353;
const int N = 20210926;
const int SB = 32;

vector<ll> dp(N+1);

void prep(){
    dp[1] = 1;

    for(int i  = 1; i <= N; i++){
        for(int j = 2; j * i <= N; j++){
            dp[i*j] += dp[i];
            dp[i*j] %= mod;
        }
    }
}

int main(){
    prep();

    int n;
    cin >> n;

    ll ans = 0;

    //for(int i = 1; i <= n; i++){
     //   ans += pref[i] - pref[i-1];
    //}

    cout << ans << "\n";
}

详细

Test #1:

score: 0
Time Limit Exceeded

input:

1

output:


result: