Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- int y = 3;
- while (n >= 0) {
- long long m1 = min(y, 13);
- for (int m = 2; m < m1; m++) {
- for (int d = 1; d < m; d++) {
- n -= 1;
- if (n <= 0) {
- cout << y << "/" << m << "/" << d;
- return 0;
- }
- }
- }
- y++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement