fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. ios_base::sync_with_stdio(false);
  7. cin.tie(NULL);
  8. int t=0;cin>>t;
  9. while(t--)
  10. {
  11. long long int a,b,num;
  12. long long int n=1;
  13. cin>>a>>b>>num;
  14. for(long long int i=1;i<=a;i++)
  15. {
  16. n=(n*a)+b;
  17. }
  18. cout<<n<<endl;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Standard output is empty