QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#354688 | #8165. Numerous Elimination | Edwin_VanCleef | WA | 1ms | 3688kb | C++14 | 1.3kb | 2024-03-15 21:07:30 | 2024-03-15 21:07:31 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
namespace zzx{
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef __int128 lll;
#define pc putchar
#define gc getchar
#define et pc('\n')
#define spc pc(' ')
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mk make_pair
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
template<class T>
void read(T &num){
T x=0,f=1;
char c=gc();
while(!isdigit(c)){
if(c=='-') f=-1;
c=gc();
}
while(isdigit(c)){
x=(x<<3)+(x<<1)+c-48;
c=gc();
}
num=f*x;
}
template<class T>
void write(T x){
static char buf[40];
static int len=-1;
if(x<0) pc('-'),x=-x;
do{
buf[++len]=x%10+48;
x/=10;
}while(x);
while(len>=0) pc(buf[len--]);
}
}
using namespace zzx;
const ll mod=998244353;
ll ksm(ll a,ll b){
ll res=1;
while(b){
if(b&1) res=res*a%mod;
b>>=1;
a=a*a%mod;
}
return res;
}
void solve(){
ll n;
read(n);
write(ksm(2,n)-n-1);
}
int main(){
int t=1;
// read(t);
while(t--) solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3688kb
input:
3
output:
4
result:
ok "4"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
5
output:
26
result:
ok "26"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
100000
output:
538161387
result:
ok "538161387"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1
output:
0
result:
ok "0"
Test #5:
score: -100
Wrong Answer
time: 1ms
memory: 3544kb
input:
5350
output:
-1712
result:
wrong answer 1st words differ - expected: '998242641', found: '-1712'