From 7331158d3ad254927f7fd20505d843e2fc23da08 Mon Sep 17 00:00:00 2001 From: VectorKappa Date: Wed, 12 Oct 2022 14:58:28 +0200 Subject: [PATCH] =?UTF-8?q?Dodano=20zadanie=20z=20przest=C4=99pno=C5=9Bci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prz.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 prz.cpp diff --git a/prz.cpp b/prz.cpp new file mode 100644 index 0000000..c7b85f9 --- /dev/null +++ b/prz.cpp @@ -0,0 +1,20 @@ +#include +int main() +{ + std::ios_base::sync_with_stdio(false); + std::cin.tie(nullptr); + long rok; + std::string przest; + std::cin >> rok; + if ( rok % 4 == 0 ){ + if ( rok % 100 == 0 and rok % 400 != 0 ){ + przest = "NIE"; + } else { + przest = "TAK"; + } + } else { + przest = "NIE"; + } + std::cout << przest; + return 0; +}