{"id":1100,"date":"2015-03-25T08:05:01","date_gmt":"2015-03-25T07:05:01","guid":{"rendered":"http:\/\/www.webotlet.hu\/?p=1100"},"modified":"2017-03-10T13:07:30","modified_gmt":"2017-03-10T12:07:30","slug":"fal","status":"publish","type":"post","link":"https:\/\/www.webotlet.hu\/?p=1100","title":{"rendered":"Egyperces feladat &#8211; \u00c9p\u00edts\u00fcnk falat"},"content":{"rendered":"<p>Adott 3 v\u00e1ltoz\u00f3:<br \/>\n<strong>s<\/strong>: small, vagyis kis t\u00e9gl\u00e1k darabsz\u00e1ma, magass\u00e1guk egyenk\u00e9nt 1 egys\u00e9g<br \/>\n<strong>b<\/strong>: big, vagyis nagy t\u00e9gl\u00e1k darabsz\u00e1ma, magass\u00e1guk egyenk\u00e9nt 5 egys\u00e9g<br \/>\n<strong>w<\/strong>: wall, vagyis a fal magass\u00e1ga<\/p>\n<p>A feladat az, hogy vizsg\u00e1ld meg, a rendelkez\u00e9sre \u00e1ll\u00f3 t\u00e9gl\u00e1kb\u00f3l meg\u00e9p\u00edthet\u0151-e az adott falmagass\u00e1g. Nem alacsonyabb, nem magasabb, pontosan annyi. Hi\u00e1ba van 4 nagy t\u00e9gl\u00e1d, abb\u00f3l csak 5-10-15-20 magass\u00e1g\u00fa falakat \u00e9p\u00edthetsz, de 17-est, 8-ast, 14-est, stb nem.<\/p>\n<p><strong>A feladat megold\u00e1sa sor\u00e1n nem haszn\u00e1lhatsz semmilyen ciklust, vagy be\u00e9p\u00edtett oszt\u00e1lyt!<\/strong><\/p>\n<p>A k\u00f6vetkez\u0151 adatokkal tesztelheted a programod. A sz\u00e1mok sorrendje kicsi, nagy, fal:<\/p>\n<table border=\"2\">\n<tbody>\n<tr>\n<th width=\"40%\">Bemenet<\/th>\n<th>Kimenet<\/th>\n<\/tr>\n<tr>\n<td width=\"40%\">3, 1, 8<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">3, 1, 9<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">3, 2, 10<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">3, 2, 8<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">3, 2, 9<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">6, 1, 11<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">6, 0, 11<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">1, 4, 11<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">0, 3, 10<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">1, 4, 12<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">3, 1, 7<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">1, 1, 7<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">2, 1, 7<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">7, 1, 11<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">7, 1, 8<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">7, 1, 13<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">43, 1, 46<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">40, 1, 46<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">40, 2, 47<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">40, 2, 50<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">40, 2, 52<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">22, 2, 33<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">0, 2, 10<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">1000000, 1000, 1000100<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">2, 1000000, 100003<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">20, 0, 19<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">20, 0, 21<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">20, 4, 51<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td width=\"40%\">20, 4, 39<\/td>\n<td>true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Ha a megold\u00e1sodat elk\u00fcld\u00f6d nekem, megmondom, hogy egyszer\u0171s\u00edthet\u0151-e. A c\u00e9l a lehet\u0151 legegyszer\u0171bb megold\u00e1s.<\/p>\n<p>A feladat innen: <a href=\"http:\/\/codingbat.com\/prob\/p183562\">http:\/\/codingbat.com\/prob\/p183562<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adott 3 v\u00e1ltoz\u00f3: s: small, vagyis kis t\u00e9gl\u00e1k darabsz\u00e1ma, magass\u00e1guk egyenk\u00e9nt 1 egys\u00e9g b: big, vagyis nagy t\u00e9gl\u00e1k darabsz\u00e1ma, magass\u00e1guk egyenk\u00e9nt 5 egys\u00e9g w: wall, vagyis a fal magass\u00e1ga A feladat az, hogy vizsg\u00e1ld meg, a rendelkez\u00e9sre \u00e1ll\u00f3 t\u00e9gl\u00e1kb\u00f3l meg\u00e9p\u00edthet\u0151-e <a class=\"more-link\" href=\"https:\/\/www.webotlet.hu\/?p=1100\">Tov\u00e1bb <span class=\"screen-reader-text\">  Egyperces feladat &#8211; \u00c9p\u00edts\u00fcnk falat<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[158,159,43,86,144,183],"class_list":["post-1100","post","type-post","status-publish","format-standard","hentry","category-egypercesek","tag-c","tag-c-programozas","tag-feltetel-vizsgalat","tag-java","tag-java_programozas","tag-programozas-feladat"],"_links":{"self":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts\/1100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1100"}],"version-history":[{"count":11,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts\/1100\/revisions"}],"predecessor-version":[{"id":2124,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts\/1100\/revisions\/2124"}],"wp:attachment":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}