結果

問題 No.3034 7 problems
ユーザー 夕叢霧香(ゆうむらきりか)夕叢霧香(ゆうむらきりか)
提出日時 2018-04-01 22:54:16
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 779 bytes
コンパイル時間 623 ms
コンパイル使用メモリ 76,296 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-08 12:49:53
合計ジャッジ時間 7,346 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}

int main(){
  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=0;
    rep(i,n+1){
      if(i<=1)continue;
      tmp=(tmp+powmod(i,mod-2))%mod;
    }
    tmp=tmp*n%mod;
    rep(i,n)tmp=tmp*(i+1)%mod;
    cout<<tmp<<endl;
    cout<<endl;
  }
}
0