結果
| 問題 |
No.8034 7 problems
|
| コンテスト | |
| ユーザー |
夕叢霧香(ゆうむらきりか)
|
| 提出日時 | 2018-04-01 22:56:07 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 869 bytes |
| コンパイル時間 | 786 ms |
| コンパイル使用メモリ | 74,860 KB |
| 最終ジャッジ日時 | 2025-01-05 09:45:27 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 51 |
ソースコード
#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
typedef long long lint;
typedef vector<int>vi;
typedef pair<int,int>pii;
#define rep(i,n)for(int i=0;i<(int)(n);++i)
const lint mod=1e9+7;
lint powmod(lint x,lint e){
lint prod=1;
for(int i=63;i>=0;--i){
prod=prod*prod%mod;
if(e&1LL<<i)prod=prod*x%mod;
}
return prod;
}
const int N=110000;
lint harm[N];
lint fact[N];
int main(){
fact[0]=fact[1]=1;
for(int i=2;i<N;++i){
fact[i]=fact[i-1]*i%mod;
harm[i]=(harm[i-1]+powmod(i,mod-2))%mod;
}
int t;
cin>>t;
rep(i,t){
lint n;
cin>>n;
cout<<n*n<<endl;
cout<<n*n*n+n*n-n<<endl;
cout<<t<<endl;
cout<<4*n*n+17<<endl;
cout<<powmod(n,n*n*n%(mod-1))<<endl;
cout<<n<<endl;
lint tmp=harm[n];
tmp=tmp*n%mod;
tmp=tmp*fact[n]%mod;
cout<<tmp<<endl;
cout<<endl;
}
}
夕叢霧香(ゆうむらきりか)