fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int i,t;
  7. cin>>t;
  8. for(int i=0;i<t;i++)
  9. {
  10. int n; cin>>n;
  11. unsigned int k=0;
  12. unsigned int l=0;
  13. int no=0;
  14. for(int j=0;j<n;j++)
  15. {
  16. int a;
  17. if(n/2-j<(21474) && n/2-j>=0){
  18. //cout<<"100000 ";
  19. a=100000;
  20. no++;
  21. }
  22. else if(j-n/2<21474 && j-n/2>=0){
  23. //cout<<"100000 ";
  24. a=100000;
  25.  
  26. }
  27. else
  28. {
  29. // cout<<"1 ";
  30. a=3;
  31. }
  32. if(j<=n)
  33. k=k+a;
  34. else
  35. l=l+a;
  36.  
  37. }
  38. cout<<k<<endl;
  39. // cout<<l<<endl;
  40. // cout<<no<<endl;
  41. }
  42. cout<<endl;
  43. return 0;
  44. }
Success #stdin #stdout 0s 15224KB
stdin
1
100000
stdout
4294871159