fork download
  1. //El_fnan
  2. #include <bits/stdc++.h>
  3. #define ll long long
  4. #define ull unsigned long long
  5. #define ss string
  6. #define tw ll t;cin>>t;while(t--)
  7. #define RBNZL ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
  8. /* cout << fixed << setprecision(7)<< */
  9. using namespace std;
  10. const ll N=1e9+7;
  11. ll x(ll n){
  12. ll f=9;//
  13. for(int i=0;i<n;i++){f*=10;f%=N;}//
  14. return f;
  15. }
  16. int main()
  17. {
  18. RBNZL
  19. tw{
  20. ull n;cin>>n;
  21. if(n==1)cout<<10<<'\n';
  22. else{
  23. n=ceil(n/2.0)-1;
  24. cout<<x(n)<<'\n';
  25. }
  26. }
  27. }
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
Standard output is empty