Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <ctime>
- using namespace std;
- int main(){
- int day, month, year;
- cin >> day >> month >> year;
- int hour, minute;
- cin >> hour >> minute;
- int bd = 3, bm = 7, by = 2001;
- int pd = 0, pm = 0, py = 0;
- long long ph = 0, pmin = 0, ps = 0;
- int meseci[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- for(int i = by; i <= year; i++) {
- if((i % 400 == 0) or (i % 4 == 0 and i % 100 != 0)) {
- meseci[1] = 29;
- }
- else {
- meseci[1] = 28;
- }
- for(int j = 1; j <= 12; j++) {
- if(i == by and j >= bm) {
- pd += meseci[j - 1];
- pm++;
- ph += (meseci[j - 1] * 24);
- pmin += (meseci[j - 1] * 24 * 60);
- ps += (meseci[j - 1] * 24 * 60 * 60);
- }
- }
- py++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement