{"id":186,"date":"2024-04-26T16:52:34","date_gmt":"2024-04-26T08:52:34","guid":{"rendered":"https:\/\/seanxd.com\/?p=186"},"modified":"2024-04-26T16:52:36","modified_gmt":"2024-04-26T08:52:36","slug":"zerojudge-d066","status":"publish","type":"post","link":"https:\/\/seanxd.com\/en\/zerojudge-d066\/","title":{"rendered":"ZeroJudge D066: Go to School!"},"content":{"rendered":"<p class=\"translation-block\">To determine if it's a time when students must be at school, check if the current time is between 7:30 and 17:00. If it falls within this range, then it's the time when students must be at school.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sample Inputs\/Outputs<\/h2>\n\n\n\n<figure class=\"wp-block-table nfd-wb-animate nfd-wb-fade-in-bottom-short\"><table class=\"has-fixed-layout\"><thead><tr><th>Sample Input(s)<\/th><th>Sample Output(s)<\/th><\/tr><\/thead><tbody><tr><td class=\"translation-block\">The input consists of a single line containing two integers separated by a space, hh and mm, where hh represents the current hour in the 24-hour format.<\/td><td class=\"translation-block\">If it is school time now, please output \"At School\"; otherwise, output \"Off School.\"<\/td><\/tr><tr><td>17  00<\/td><td>Off School<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Thought Process<\/h2>\n\n\n\n<p class=\"translation-block\">Use an <strong>If<\/strong> statement to determine if the input time falls within the school hours interval.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sample Code\uff0d<a href=\"https:\/\/zerojudge.tw\/ShowProblem?problemid=d066\" target=\"_blank\" rel=\"noreferrer noopener\">ZeroJudge D066: Go to School!<\/a><\/h3>\n\n\n\n<div class=\"hcb_wrap nfd-wb-animate nfd-wb-reveal-right nfd-delay-50\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n  int a, b;\n  cin &gt;&gt; a &gt;&gt; b;\n  if (a &lt; 7 || a &gt;= 17) cout &lt;&lt; &quot;Off School&quot; &lt;&lt; endl;\n  else if (a == 7 && b &lt; 30) cout &lt;&lt; &quot;Off School&quot; &lt;&lt; endl;\n  else cout &lt;&lt; &quot;At School&quot; &lt;&lt; endl;\n}\n\n\/\/Z.O.J. D066\n\/\/Dr. SeanXD<\/code><\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u677f\u6a4b\u9ad8\u4e2d\u898f\u5b9a\u540c\u5b78\u5fc5\u9808\u5728 7:30 \u4ee5\u524d\u5230\u6821\u65e9\u81ea\u7fd2\uff0c\u6700\u5f8c\u4e00\u5802\u8ab2\u5247\u5728 17:00 \u4e0b\u8ab2\u3002\u7d66\u4f60\u73fe\u5728\u7684\u6642\u9593\uff0c\u8acb\u5224\u65b7\u73fe\u5728 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[6],"tags":[8],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-6","tag-8"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":2,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts\/186\/revisions\/188"}],"wp:attachment":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}