Codeforces Round 867 (Div. 3) 1822C. Bun Lover Solution
Problem Link : https://codeforces.com/contest/1822/problem/C
Solution in C++:
- /// Author : AH_Tonmoy
- #include <bits/stdc++.h>
- using namespace std;
- int32_t main() {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- int t;
- cin >> t;
- while (t--) {
- long long n ;
- cin >> n ;
- cout << ( n + 1 ) * ( n + 1) + 1 << endl;
- }
- }
No comments