UOJ Logo

NOI.AC

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#208300#3759. 七Allen123456hello1001ms1192kbC++11444b2024-08-02 09:44:032024-08-02 12:09:02

answer

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize(2)
typedef long long LL;
const LL mod=998244353;
LL qpow(LL a,LL b){
    LL ans=1;a%=mod;
    while (b){
        if (b&1){ans*=a;ans%=mod;}
        a*=a;a%=mod;
        b>>=1;
    }
    return ans;
}
LL solve(LL n){
    return ((qpow(10,n)-qpow(9,n))%mod+mod)%mod;
}
int main(){
    LL n;
    scanf("%lld",&n);
    printf("%lld",solve(n));
    return 0;
}

Details

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 0ms
memory: 1188kb

input:

5

output:

40951

result:

ok single line: '40951'

Test #2:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

6

output:

468559

result:

ok single line: '468559'

Test #3:

score: 10
Accepted
time: 0ms
memory: 1188kb

input:

55555

output:

804269613

result:

ok single line: '804269613'

Test #4:

score: 10
Accepted
time: 0ms
memory: 1188kb

input:

66666

output:

564026970

result:

ok single line: '564026970'

Test #5:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

77777

output:

11325516

result:

ok single line: '11325516'

Test #6:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

99999

output:

103114180

result:

ok single line: '103114180'

Test #7:

score: 10
Accepted
time: 0ms
memory: 1188kb

input:

987654321

output:

199913509

result:

ok single line: '199913509'

Test #8:

score: 10
Accepted
time: 1ms
memory: 1188kb

input:

999999999

output:

107253766

result:

ok single line: '107253766'

Test #9:

score: 10
Accepted
time: 0ms
memory: 1188kb

input:

938281736

output:

654499906

result:

ok single line: '654499906'

Test #10:

score: 10
Accepted
time: 0ms
memory: 1188kb

input:

837271623

output:

48926228

result:

ok single line: '48926228'

Extra Test:

score: 0
Extra Test Passed