Advertisement
Josif_tepe

Untitled

Mar 7th, 2024
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. //#include <bits/stdc++.h>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main() {
  8.     int n;
  9.     cin>>n;
  10.     int suma = 0;
  11.     vector<pair<int,int>> domino;
  12.     for(int i = 0; i<=n; i++) {
  13.         for(int j = i; j<=n; j++) {
  14.             suma += i + j;
  15.         }
  16.     }
  17.    
  18.     cout<<suma;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement