Advertisement
Hello_MMM

Untitled

Dec 13th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. #include <cmath>
  5.  
  6.  
  7. using namespace std;
  8. int main() {
  9.     int n;
  10.     cin >> n;
  11.  
  12.     int y = 3;
  13.     while (n >= 0) {
  14.         long long m1 = min(y, 13);
  15.         for (int m = 2; m < m1; m++) {
  16.             for (int d = 1; d < m; d++) {
  17.                 n -= 1;
  18.                 if (n <= 0) {
  19.                     cout << y << "/" << m << "/" << d;
  20.                     return 0;
  21.                 }
  22.             }
  23.         }
  24.         y++;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement