{"id":350,"date":"2022-06-28T21:56:33","date_gmt":"2022-06-28T21:56:33","guid":{"rendered":"http:\/\/yesrenee.com\/?p=350"},"modified":"2023-08-28T18:10:49","modified_gmt":"2023-08-28T18:10:49","slug":"dmoj-special-day-3p","status":"publish","type":"post","link":"https:\/\/yesrenee.com\/?p=350","title":{"rendered":"DMOJ-Special Day 3p"},"content":{"rendered":"\n<p>Question:<\/p>\n\n\n\n<p>February 18 is a special date for the CCC this year.<\/p>\n\n\n\n<p>Write a program that asks the user for a numerical month and numerical day of the month and then determines whether that date occurs before, after, or on February 18.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If the date occurs before February 18, output the word&nbsp;<code>Before<\/code>.<\/li><li>If the date occurs after February 18, output the word&nbsp;<code>After<\/code>.<\/li><li>If the date is February 18, output the word&nbsp;<code>Special<\/code>.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Input Specification<\/h4>\n\n\n\n<p>The input consists of two integers each on a separate line. These integers represent a date in&nbsp;2015.<\/p>\n\n\n\n<p>The first line will contain the month, which will be an integer in the range from&nbsp;1&nbsp;(indicating January) to&nbsp;12&nbsp;(indicating December).<\/p>\n\n\n\n<p>The second line will contain the day of the month, which will be an integer in the range from&nbsp;1&nbsp;to&nbsp;31. You can assume that the day of the month will be valid for the given month.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Output Specification<\/h4>\n\n\n\n<p>Exactly one of&nbsp;<code>Before<\/code>,&nbsp;<code>After<\/code>, or&nbsp;<code>Special<\/code>&nbsp;will be printed on one line.<\/p>\n\n\n\n<p><strong>Sample Input<\/strong><\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<p>After<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-default\"\/>\n\n\n\n<p>Find a solution to this if you&#8217;re bored.<\/p>\n\n\n\n<p>If want the solution, scroll down for an answer!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a <strong>=<\/strong> int(input())\nb <strong>=<\/strong> int(input())\n<strong>if<\/strong> a <strong>==<\/strong> 2 <strong>and<\/strong> b <strong>==<\/strong> 18:\n    print(\"Special\")\n<strong>elif<\/strong> (a <strong>&lt;=<\/strong> 1) <strong>or<\/strong> (a <strong>==<\/strong> 2 <strong>and<\/strong> b <strong>&lt;<\/strong> 18):\n    print(\"Before\")\n<strong>else<\/strong>:\n    print(\"After\")<\/code><\/pre>\n\n\n\n<p>Don&#8217;t be nervous, my next blog is a good surprise!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question: February 18 is a special date for the CCC this year. Write a program that asks the user for a numerical month and numerical day of the month and then determines whether that date occurs before, after, or on February 18. If the date occurs before February 18, output the word&nbsp;Before. If the date [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[19],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","category-daily","tag-python-programming"],"_links":{"self":[{"href":"https:\/\/yesrenee.com\/index.php?rest_route=\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yesrenee.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yesrenee.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yesrenee.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yesrenee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=350"}],"version-history":[{"count":2,"href":"https:\/\/yesrenee.com\/index.php?rest_route=\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/yesrenee.com\/index.php?rest_route=\/wp\/v2\/posts\/350\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/yesrenee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yesrenee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yesrenee.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}