ulvis.paste.net

Paste Search Dynamic
Recent pastes
n
  1. #include<bits/stdc++.h>
  2. #include<boost/multiprecision/cpp_int.hpp>
  3. using namespace std;
  4. namespace mp=boost::multiprecision;
  5. #define ll mp::cpp_int
  6. #define m 1000007
  7. int main() {
  8.         // your code goes here
  9.         ll t;cin>>t;
  10.         for(long long i=0;i<t;i++)
  11.         {
  12.                 ll n;cin>>n;
  13.                 cout<<(((n)*((3*n+1)))/2)%m<<"\n";
  14.         }
  15.         return 0;
  16. }
Parsed in 0.003 seconds