Advertisement
Guest User

Untitled

a guest
Mar 1st, 2018
1,836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 208.15 KB | None | 0 0
  1. <html lang="en" class=" mod_js mod_flexbox mod_flexboxlegacy mod_canvas mod_canvastext mod_webgl mod_no-touch mod_geolocation mod_history mod_draganddrop mod_rgba mod_hsla mod_multiplebgs mod_backgroundsize mod_borderimage mod_borderradius mod_boxshadow mod_textshadow mod_opacity mod_cssanimations mod_csscolumns mod_cssgradients mod_cssreflections mod_csstransforms mod_no-csstransforms3d mod_csstransitions mod_fontface mod_no-generatedcontent mod_video mod_audio mod_applicationcache mod_svg mod_inlinesvg mod_smil mod_svgclippaths mod_csscalc mod_fullscreen mod_cssresize mod_no-ie8compat"><head>
  2. <script type="text/javascript" async="" src="https://cdn.mxpnl.com/libs/mixpanel-2.2.min.js"></script><script type="text/javascript" async="" src="https://ssl.google-analytics.com/ga.js"></script><script async="" id="demandbase_js_lib" src="https://scripts.demandbase.com/627a2f63.min.js"></script><script type="text/javascript" async="" src="https://cdn.heapanalytics.com/js/heap-698647726.js"></script><script async="" src="//static.ads-twitter.com/uwt.js"></script><script src="https://connect.facebook.net/signals/config/265287730544127?v=2.8.12&amp;r=stable" async=""></script><script async="" src="https://connect.facebook.net/en_US/fbevents.js"></script><script type="text/javascript" async="" src="https://snap.licdn.com/li.lms-analytics/insight.min.js"></script><script type="text/javascript" async="" src="https://ssl.google-analytics.com/ga.js"></script><script type="text/javascript" async="" src="//static.hotjar.com/c/hotjar-532110.js?sv=5"></script><script async="" src="https://www.googletagmanager.com/gtm.js?id=GTM-PKNP883"></script><script>
  3. window.use_codeshellx = false
  4. </script>
  5. <script type="text/javascript">
  6. var CKEDITOR_BASEPATH = "/assets/ckeditor/";
  7. var HR;
  8. HR = window.HR || {};
  9. HR.PREFETCH_DATA = {"metadata":{"asset_path":"https://hrcdn.net/hackerrank/assets","asset_host":"https://hrcdn.net","asset_host_path":"https://hrcdn.net/hackerrank","filepicker_key":"ApehXMbvXTWqWab7OmMr9z","pubsub_host":"https://pubsub.hackerrank.com"},"test":{"unique_id":"ddt8o9j9hk4","name":"Front End Developer Test","duration":20,"questions_count":20,"instructions":"\u003cp style=\"font-size: 16px;\"\u003eWe have reviewed your application for the Front End Developer role with Booking.com and would like to move you to the next step in the interview process. Please take 20 minutes to complete this HackerRank assessment for Front End Developer's; once we receive your results we can move forward.\u003c/p\u003e\n\n\u003cp style=\"font-size: 16px;\"\u003e\u0026nbsp;\u003c/p\u003e\n\n\u003col\u003e\n\t\u003cli style=\"font-size: 16px;\"\u003eThe test has \u003cstrong\u003e20\u0026nbsp;multiple-choice\u0026nbsp;questions\u003c/strong\u003e.\u003c/li\u003e\n\t\u003cli style=\"font-size: 16px;\"\u003ePlease try to answer all questions. We get the best idea of how you work when we see all the answers.\u003c/li\u003e\n\t\u003cli style=\"font-size: 16px;\"\u003eOnce you login, you should complete the test in a single attempt. You have \u003cstrong\u003e20 minutes\u003c/strong\u003e to complete the test.\u003c/li\u003e\n\t\u003cli style=\"font-size: 16px;\"\u003ePlease do not close the window/tab at any point of time during the test even though we have ensured our best to restore the test to the same state as it was earlier.\u003c/li\u003e\n\t\u003cli style=\"font-size: 16px;\"\u003eTo understand more about the environment, time limits, etc. you can read the\u0026nbsp;\u003ca href=\"https://www.hackerrank.com/tests/info/faq\" style=\"font-size: 16px;\"\u003eFAQ here\u003c/a\u003e.\u003c/li\u003e\n\t\u003cli style=\"font-size: 16px;\"\u003eIt is okay to use reference language documentation or use an IDE that has code completion features. However, it is not acceptable to consult/copy code from any source including a website, book, or friend/colleague to complete these tests.\u003c/li\u003e\n\u003c/ol\u003e\n","collect_info":[],"custom_acknowledge_text":null,"hide_compile_test":null,"feedback_message":null,"no_feedback":null,"hide_template":null,"feedback_text_question":null,"job_roles":null,"footer_copyright":null,"enable_acknowledgement":null,"enable_contextmenu":null,"section_slots_decoded":null,"task_test":false,"task_time":null,"show_section_names":null,"disable_offlinejs":null,"enable_codefullscreen":null,"disable_paste":null,"enable_codefixedheader":null,"sudorank_test":false,"secure":null,"hr_candidate_login":true,"hr_company_id":5,"enable_solve_later":null,"ask_candidate_profile":true,"needs_verify_mobile":true,"can_use_codeshellx":false,"enable_autocomplete":null,"enable_proctoring":null,"firepad_tracking":null,"section_stay_time":null,"hide_hidden_testcase":null,"redirect_after_feedback":null,"disable_confirmation_email":false,"i18n_language":null,"candidate_frontend_message":null},"ab_tests":{"models":[{"id":176,"name":"custom-input-v4","product":5,"variants":[{"id":621,"weight":10,"variant":"trm1"},{"id":622,"weight":10,"variant":"cnt1"},{"id":623,"weight":40,"variant":"trm2"},{"id":624,"weight":40,"variant":"cnt2"}],"hacker_variant":{"variant":"trm2","forced":false}}]},"feature_flags":{"dummy_feature":{"enable":"false"},"hrw-apidocs":{"enable":"true"}}};
  10. HR.MANIFEST_HASH = "1b19a88aff15602bdf034ebfe49effcf57cf6d43";
  11. </script>
  12.  
  13. <script type="text/javascript">
  14. function set_manifest(manifest) {
  15. HR.MANIFEST = manifest;
  16. }
  17. </script>
  18.  
  19. <script type="text/javascript">
  20. window.PRODUCT_NAMESPACE = 'candidate_site'
  21. window.APP_METRIC_TRACKING_ENABLED = false
  22. window.PERF_METRICS = {
  23. tracked_initial_view_load_tti: {},
  24. tracked_view_load_tti: {}
  25. }
  26. if ((window.PRODUCT_NAMESPACE == 'hackerrank' || window.PRODUCT_NAMESPACE == 'hackerrankx') && (Math.floor(Math.random() * 2) + 1) == 1) {
  27. window.APP_METRIC_TRACKING_ENABLED = true
  28. }
  29. </script>
  30. <!-- jsCookies -->
  31. <script type="text/javascript">
  32. /*!
  33. * JavaScript Cookie v2.1.2
  34. * https://github.com/js-cookie/js-cookie
  35. *
  36. * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
  37. * Released under the MIT license
  38. */
  39. if(function(factory){if("function"==typeof define&&define.amd)define(factory);else if("object"==typeof exports)module.exports=factory();else{var OldCookies=window.Cookies,api=window.Cookies=factory();api.noConflict=function(){return window.Cookies=OldCookies,api}}}(function(){function extend(){for(var i=0,result={};i<arguments.length;i++){var attributes=arguments[i];for(var key in attributes)result[key]=attributes[key]}return result}function init(converter){function api(key,value,attributes){var result;if("undefined"!=typeof document){if(arguments.length>1){if(attributes=extend({path:"/"},api.defaults,attributes),"number"==typeof attributes.expires){var expires=new Date;expires.setMilliseconds(expires.getMilliseconds()+864e5*attributes.expires),attributes.expires=expires}try{result=JSON.stringify(value),/^[\{\[]/.test(result)&&(value=result)}catch(e){}return value=converter.write?converter.write(value,key):encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),key=encodeURIComponent(String(key)),key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),key=key.replace(/[\(\)]/g,escape),document.cookie=[key,"=",value,attributes.expires&&"; expires="+attributes.expires.toUTCString(),attributes.path&&"; path="+attributes.path,attributes.domain&&"; domain="+attributes.domain,attributes.secure?"; secure":""].join("")}key||(result={});for(var cookies=document.cookie?document.cookie.split("; "):[],rdecode=/(%[0-9A-Z]{2})+/g,i=0;i<cookies.length;i++){var parts=cookies[i].split("="),cookie=parts.slice(1).join("=");'"'===cookie.charAt(0)&&(cookie=cookie.slice(1,-1));try{var name=parts[0].replace(rdecode,decodeURIComponent);if(cookie=converter.read?converter.read(cookie,name):converter(cookie,name)||cookie.replace(rdecode,decodeURIComponent),this.json)try{cookie=JSON.parse(cookie)}catch(e){}if(key===name){result=cookie;break}key||(result[name]=cookie)}catch(e){}}return result}}return api.set=api,api.get=function(key){return api(key)},api.getJSON=function(){return api.apply({json:!0},[].slice.call(arguments))},api.defaults={},api.remove=function(key,attributes){api(key,"",extend(attributes,{expires:-1}))},api.withConverter=init,api}return init(function(){})}),"undefined"==typeof jsCookies&&"undefined"!=typeof Cookies)var jsCookies={get:function(c_name){return Cookies.get(c_name)},set:function(c_name,value,expiredays,expirehours,expiremins,expiresecs,options){var exdate=new Date;exdate.setDate(exdate.getDate()+(expiredays||0)),exdate.setHours(exdate.getHours()+(expirehours||0)),exdate.setMinutes(exdate.getMinutes()+(expiremins||0)),exdate.setSeconds(exdate.getSeconds()+(expiresecs||0));var set_expire_time=!(null==expiredays&&null==expiresecs&&null==expiremins&&null==expirehours),config=options||{};set_expire_time&&(config.expires=exdate),Cookies.set(c_name,value,config)},check:function(c_name){return!!Cookies.get(c_name)},destroy:function(c_name){Cookies.remove(c_name)}};
  40. //# sourceMappingURL=https://staging.hackerrank.net/assets/sourcemaps/jscookies-8389b02c1b0dea983121dcc4d38df257.js.map
  41. </script>
  42.  
  43. <script type="text/javascript">
  44. !function(){function getRandRange(min,max){return parseInt(Math.random()*(max-min))+min}function getRandChar(){var offset=getRandRange(0,35);return offset>25?(offset-26).toString():String.fromCharCode(97+offset)}function makeId(length){for(var text="",i=0;length>i;i++)text+=getRandChar();return text}function setSessionId(){key="session_id";var session_key=jsCookies.get(key);session_key?jsCookies.set(key,session_key,null,2,null,null,{secure:!0}):(epoch=(new Date).getTime(),rand_id=makeId(8),jsCookies.set(key,rand_id+"-"+epoch.toString(),null,2,null,null,{secure:!0})),setTimeout(setSessionId,6e4)}setSessionId()}();
  45. //# sourceMappingURL=https://staging.hackerrank.net/assets/sourcemaps/set_session-405f0e9328aca86bb71908a40f13dff8.js.map
  46. </script>
  47.  
  48. <!-- CDN Failsafe -->
  49. <style>
  50. .cdn-error-view {
  51. position: fixed;
  52. width: 100%;
  53. height: 100%;
  54. top: 0;
  55. left: 0;
  56. background: white;
  57. z-index: 9999;
  58. font-family: "Whitney SSm A", "Whitney SSm B", "Avenir", "Segoe UI", "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif;
  59. }
  60.  
  61. .cdn-error-view .error-box-wrap {
  62. position: absolute;
  63. top: 50%;
  64. left: 50%;
  65. padding: 20px;
  66. transform: translate(-50%, -50%);
  67. -ms-transform: translate(-50%, -50%);
  68. -webkit-transform: translate(-50%, -50%);
  69. text-align: center;
  70. }
  71. .cdn-error-view .error-icon {
  72. text-align: center;
  73. }
  74. .cdn-error-view .error-title {
  75. font-size: 48px;
  76. margin-top: 30px;
  77. margin-bottom: 0;
  78. font-weight: bold;
  79. }
  80. .cdn-error-view .error-message {
  81. margin-top: 20px;
  82. margin-bottom: 0;
  83. }
  84. .cdn-error-view .btn-wrap {
  85. margin-top: 20px;
  86. }
  87. .cdn-error-view .btn-reload {
  88. width: 300px;
  89. padding: 10px;
  90. border-radius: 3px;
  91. border-color: #088837;
  92. border-bottom-color: #007827;
  93. border-width: 1px;
  94. border-style: solid;
  95. color : #FFF;
  96. background-color: #2ec866;
  97. background-image: -webkit-gradient(linear, top left, bottom left, color-stop(0, #2ec866), color-stop(1, #29b35b));
  98. background-image: -webkit-linear-gradient(top, #2ec866, #29b35b);
  99. background-image: linear-gradient(top, #2ec866, #29b35b);
  100. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1), inset 0 -1px 4px rgba(32, 138, 70, 0.3);
  101. outline: none;
  102. }
  103. </style>
  104.  
  105. <script>
  106. var cdnLoaded = false;
  107.  
  108. var checkForWorkingCDN = (function() {
  109. //this two value should come from configuration
  110. var cdns = ["hrcdn.net","d3keuzeb2crhkn.cloudfront.net"];
  111. var cdnUrl = jsCookies.get('cdn_url') || cdns[0];
  112. var filePath = "https://hrcdn.net/hackerrank/assets/cdnping-d8824f325f64e103a04a4582006560a7.js";
  113.  
  114. //extract pathname from url
  115. var urlRegex = /^[^#]*?:\/\/.*?(\/.*)$/ ;
  116. var match = filePath.match(urlRegex);
  117. if(match) filePath = match[1];
  118.  
  119. //add current cdn on first of array
  120. cdns.splice(cdns.indexOf(cdnUrl), 1);
  121. cdns.unshift(cdnUrl);
  122.  
  123. var cdnIndx = 0;
  124.  
  125. function tryCurrentCDN() {
  126. if (cdnUrl) document.write('<script src="https://' + cdnUrl + filePath + '?' + Date.now() + '"><\/script>');
  127. document.write('<script>checkForWorkingCDN();<\/script>');
  128. }
  129.  
  130. //try the current cdn
  131. tryCurrentCDN();
  132.  
  133. return function() {
  134. if (cdnUrl && cdnLoaded) {
  135. jsCookies.set('cdn_url', cdnUrl, 3);
  136. jsCookies.set('cdn_set', 'true', 3);
  137. if (cdnIndx !== 0) {
  138. document.location.reload();
  139. }
  140.  
  141. //if cdnUrl not loaded check the next cdn;
  142. } else if (cdnUrl) {
  143. //track all the failed cdn
  144. var failedCdns = jsCookies.get('failed_cdn_hosts');
  145. if (failedCdns) {
  146. failedCdns = JSON.parse(failedCdns);
  147. } else {
  148. failedCdns = [];
  149. }
  150.  
  151. failedCdns.push(cdnUrl);
  152. jsCookies.set('failed_cdn_hosts', JSON.stringify(failedCdns), 0, 0, 15);
  153. jsCookies.set("cdn_url_switched", "true", 0, 0, 15);
  154.  
  155. //try next cdn
  156. cdnIndx += 1;
  157. cdnUrl = cdns[cdnIndx];
  158. tryCurrentCDN();
  159.  
  160. //if no cdn left to check and none of loaded return err
  161. } else {
  162. jsCookies.destroy('cdn_url');
  163. return 'cdnerror';
  164. }
  165. }
  166. }());
  167. </script><script src="https://hrcdn.net/hackerrank/assets/cdnping-d8824f325f64e103a04a4582006560a7.js?1519923829528"></script><script>checkForWorkingCDN();</script>
  168.  
  169. <script>
  170. //track cdn related matrices
  171. (function() {
  172. var allCdns = ["hrcdn.net","d3keuzeb2crhkn.cloudfront.net"];
  173.  
  174. var metrics = [];
  175. var defaultCdn = jsCookies.get('default_cdn_url');
  176.  
  177. //method to track the events
  178. function appTrack(key, attrs) {
  179. attrs = attrs || {};
  180. attrs.uid = jsCookies.get('hackerrank_mixpanel_token')
  181. metrics.push({
  182. 'key': key,
  183. 'meta_data': attrs
  184. });
  185. }
  186.  
  187. function sendMetrices() {
  188. if (!XMLHttpRequest) return;
  189. var xhr = new XMLHttpRequest();
  190. var metrics_endpoint = 'https://metrics.hackerrank.com/app_metrics'; // Todo : this need to move on configuration
  191.  
  192. if (!xhr) return;
  193.  
  194. xhr.open("POST", metrics_endpoint, true);
  195.  
  196. //set xhr headers and options
  197. xhr.setRequestHeader('Content-Type', 'application/json');
  198. xhr.withCredentials = true;
  199.  
  200. xhr.send(JSON.stringify({
  201. data: metrics,
  202. default_cdn_url: defaultCdn,
  203. document_referrer: document.referrer
  204. }));
  205. }
  206.  
  207. var cdnUrl = jsCookies.get('cdn_url');
  208. var failedCdns = jsCookies.get('failed_cdn_hosts');
  209.  
  210. var cdnMetrices = {};
  211.  
  212. //track used cdn host
  213. if (cdnUrl) {
  214. cdnMetrices['used-cdn'] = cdnUrl;
  215. cdnMetrices['cdn-index'] = allCdns.indexOf(cdnUrl) + 1;
  216. cdnMetrices['all-failed'] = false;
  217. //track if all cdn failed (If cdnUrl is not set it means all cdn url failed)
  218. } else {
  219. cdnMetrices['used-cdn'] = '';
  220. cdnMetrices['cdn-index'] = 999;
  221. cdnMetrices['all-failed'] = true;
  222. }
  223.  
  224. appTrack('cdn-metrices', cdnMetrices);
  225.  
  226. //track failed cdn
  227. if (failedCdns) {
  228. failedCdns = JSON.parse(failedCdns);
  229. jsCookies.destroy('failed_cdn_hosts');
  230. failedCdns.forEach(function(cdn) {
  231. appTrack('failed-cdn-host', {
  232. cdn: cdn
  233. });
  234. });
  235. }
  236.  
  237. //send metrics
  238. sendMetrices();
  239.  
  240. }());
  241. </script>
  242.  
  243.  
  244.  
  245.  
  246. <!-- DNS Prefetch -->
  247. <link rel="dns-prefetch" href="//hrcdn.net">
  248. <link rel="dns-prefetch" href="//d3keuzeb2crhkn.cloudfront.net">
  249. <link rel="dns-prefetch" href="//notifications.hackerrank.com">
  250. <link rel="dns-prefetch" href="//api.mixpanel.com">
  251. <link rel="dns-prefetch" href="//heapanalytics.com">
  252. <link rel="dns-prefetch" href="//metrics.hackerrank.com">
  253. <link rel="preconnect" href="https://sentry.io">
  254. <link rel="dns-prefetch" href="//sentry.io">
  255.  
  256. <!-- use the latest IE browser -->
  257. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  258.  
  259. <!-- App Icon for iOS Devices -->
  260. <link rel="apple-touch-icon-precomposed" href="https://hrcdn.net/hackerrank/assets/apple-touch-icon-precomposed-f3a05ded63a04623e70f9809d4de3fb0.png">
  261.  
  262. <!-- favicon -->
  263. <link rel="shortcut icon" type="image/png" href="https://hrcdn.net/hackerrank/assets/favicon-679803bc95e4e83ded7b9726f98795b2.png">
  264.  
  265. <!-- generating meta tags -->
  266. <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
  267. <meta charset="utf-8">
  268. <meta name="description" content="Join over 2 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews.">
  269. <meta property="og:title" content="HackerRank">
  270. <meta property="og:image" content="https://hrcdn.net/og/default.jpg">
  271. <meta property="og:description" content="Join over 2 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews.">
  272. <meta property="og:url" content="https://www.hackerrank.com/tests/cql427eis7a/login">
  273. <meta property="og:site_name" content="HackerRank">
  274. <meta property="og:type" content="website">
  275. <meta name="twitter:card" content="summary">
  276. <meta name="twitter:site" content="@hackerrank">
  277. <meta name="twitter:url" content="https://www.hackerrank.com">
  278. <meta name="twitter:title" content="HackerRank">
  279. <meta property="fb:app_id" content="347499128655783">
  280.  
  281. <link href="https://www.hackerrank.com/tests/cql427eis7a/login/" rel="canonical"><!-- ends meta tags generation -->
  282.  
  283. <!-- CSRF Token -->
  284. <meta name="csrf-param" content="authenticity_token">
  285. <meta name="csrf-token" content="vGi5eCFG7WDTV/TXRCcfFQ43we1PQPCillYc6b3xbprQxvXhi99g/EHA48neWnnlOmubuC7zR8tuob2xHuw3Jg==">
  286.  
  287. <style>.file-input-wrapper { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }.file-input-wrapper input[type=file], .file-input-wrapper input[type=file]:focus, .file-input-wrapper input[type=file]:hover { position: absolute; top: 0; left: 0; cursor: pointer; opacity: 0; filter: alpha(opacity=0); z-index: 99; outline: 0; }.file-input-name { margin-left: 8px; }</style><link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/candidate_libraries-b9f2d3129d4731f6f731f03ec15d77c0.css">
  288. <link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/balloon-3203066b9b000b5812b9e1676bb53c90.css">
  289. <link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/candidate-core-76876ecd95b06cab60d167c1acd11f4e.css">
  290. <link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/candidate-b0af44fc266933c864879aea9dc06f8d.css">
  291. <link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/custominput/public/style-1517c7b08acc88b185c1215edd612dd4.css">
  292. <link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/CodeKit/client/build/static/application-0556e8abe52d41a29a054d9cdc146b94.css">
  293. <link rel="stylesheet" media="all" href="https://hrcdn.net/hackerrank/assets/codeshell_libraries-0e70b809f885a973fbff5ac3da164339.css">
  294.  
  295.  
  296. <!-- Sentry -->
  297. <script src="https://cdn.ravenjs.com/3.22.1/raven.min.js" async="" crossorigin="anonymous" id="raven"></script>
  298. <script type="text/javascript">
  299. (function(window, queue, loaded, script) {
  300.  
  301. var raven_user_context = {
  302. email: 'mario_debes@live.com',
  303. }
  304. var raven_extra_context = {
  305. loadTimestamp: 1519923913,
  306. assetUrl: 'https://hrcdn.net',
  307. cdnUrl: 'hrcdn.net'
  308. }
  309.  
  310. window.onerror = function e(message, file, lineNo, columnNo, error) {
  311. if (loaded) return;
  312. queue.push([message, file, lineNo, columnNo, error]);
  313. };
  314.  
  315. window.onunhandledrejection = function e(error) {
  316. if (loaded) return;
  317. queue.push([
  318. error.reason.reason || error.reason.message,
  319. error.type,
  320. JSON.stringify(error.reason),
  321. ]);
  322. };
  323.  
  324. script.onreadystatechange = script.onload = function() {
  325. if (loaded) return;
  326. loaded = true;
  327.  
  328. Raven.config("https://f712db4f251a448989860dd558840c2e@sentry.io/233882", {
  329. release: 'ec7941695c6980ca6957a742f7fa194b3fc80da8'
  330. }).install();
  331. Raven.setUserContext(raven_user_context)
  332. Raven.setExtraContext(raven_extra_context)
  333. window.onunhandledrejection = function e(error) {
  334. Raven.captureException(new Error(error.reason.reason || error.reason.message), {
  335. extra: {
  336. type: error.type,
  337. reason: JSON.stringify(error.reason),
  338. },
  339. });
  340. };
  341.  
  342. queue.forEach(function(error) {
  343. Raven.captureException(error[4] || new Error(error[0]), {
  344. extra: {
  345. file: error[1],
  346. line: error[2],
  347. col: error[3],
  348. },
  349. });
  350. });
  351. };
  352. }(window, [], false, document.getElementById('raven')));
  353. </script>
  354.  
  355. <!-- Google Analyitics Init -->
  356. <script type="text/javascript">
  357. var _gaq = _gaq || [];
  358. _gaq.push(['_setAccount', "UA-45092266-1"]);
  359. _gaq.push(['_trackPageview']);
  360. _gaq.push(['_setCampSourceKey', 'utm_source']);
  361. _gaq.push(['_setCampMediumKey', 'utm_medium']);
  362. _gaq.push(['_setCampContentKey', 'utm_keyword']);
  363. _gaq.push(['_setCampTermKey', 'utm_keyword']);
  364. _gaq.push(['_setCampNameKey', 'utm_campaign']);
  365. </script>
  366.  
  367. <!-- Mixpanel Init -->
  368. <script type="text/javascript">
  369. var mixpanel = mixpanel || [];
  370. </script>
  371.  
  372. <!-- Heap Analytics Init -->
  373. <script type="text/javascript">
  374. var heap = heap || [];
  375. </script>
  376.  
  377. <script type="text/javascript">
  378. (function(h) {
  379. window.hr_metrics = h;
  380. if (!h.loaded) {
  381. var a = ['track', 'batch_track', 'app_track', 'externalService', 'init', 'batch_track_record', 'track_dwell_time', 'set_navigation_data'];
  382. for (var i = 0; i < a.length; i++) {
  383. if (!h[a[i]]) {h[a[i]] = function() {};}
  384. }
  385. }
  386. })(window.hr_metrics || {});
  387. </script>
  388.  
  389. <script type="text/javascript">
  390. /**
  391. * Protect window.console method calls, e.g. console is not defined on IE
  392. * unless dev tools are open, and IE doesn't define console.debug
  393. */
  394. (function() {
  395. if (!window.console) {
  396. window.console = {};
  397. }
  398. var m = ["log", "info", "warn", "error", "debug", "trace", "dir", "group", "groupCollapsed", "groupEnd", "time", "timeEnd", "profile", "profileEnd", "dirxml", "assert", "count", "markTimeline", "timeStamp", "clear"];
  399. // define undefined methods as noops to prevent errors
  400. for (var i = 0; i < m.length; i++) {
  401. if (!window.console[m[i]]) {
  402. window.console[m[i]] = function() {};
  403. }
  404. }
  405. })();
  406. </script>
  407.  
  408.  
  409. <!-- Errorception -->
  410.  
  411. <script type="text/javascript">
  412. var _errs = [];
  413. </script>
  414.  
  415.  
  416. <!-- Linkedin Insights -->
  417.  
  418. <!-- Google Tag Manager -->
  419. <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  420. new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  421. j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  422. 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  423. })(window,document,'script','dataLayer','GTM-PKNP883');</script>
  424. <!-- End Google Tag Manager -->
  425.  
  426.  
  427.  
  428. <script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/compound/recruit-candidate-8e989ccf7ccaf482fdd4b6957b152d0b.js" src="https://hrcdn.net/hackerrank/assets/compound/recruit-candidate-8e989ccf7ccaf482fdd4b6957b152d0b.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror_basic-f83680a73f1ed75439ebb7870fbc4b7f.js" src="https://hrcdn.net/hackerrank/assets/codemirror_basic-f83680a73f1ed75439ebb7870fbc4b7f.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/clike/clike-e8a662bb29372d98371ad2d9a65ee349.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/clike/clike-e8a662bb29372d98371ad2d9a65ee349.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/php/php-f4246e74d9a0685b74fe4a4e60c1da4b.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/php/php-f4246e74d9a0685b74fe4a4e60c1da4b.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/python/python-a6121ecf556620ad0d4bf86cd1e7880f.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/python/python-a6121ecf556620ad0d4bf86cd1e7880f.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/ruby/ruby-11b048b7600a6a2a6b20e98fd989225f.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/ruby/ruby-11b048b7600a6a2a6b20e98fd989225f.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/javascript/javascript-295fe1bc1efaf02bdcc65ca72ae9a159.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/javascript/javascript-295fe1bc1efaf02bdcc65ca72ae9a159.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/perl/perl-4052a5510fa55905f62b7d6f670e0e6b.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/perl/perl-4052a5510fa55905f62b7d6f670e0e6b.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/haskell/haskell-9a9ffa61f7f09234f1982ad425c3f2f8.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/haskell/haskell-9a9ffa61f7f09234f1982ad425c3f2f8.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/clojure/clojure-abcf44876a0ac246bc9dfb81c8b86f34.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/clojure/clojure-abcf44876a0ac246bc9dfb81c8b86f34.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/go/go-124da9b2d605ec3101bf9660c8e8c397.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/go/go-124da9b2d605ec3101bf9660c8e8c397.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/erlang/erlang-f479446de0ac51745efe6d7d274729ad.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/erlang/erlang-f479446de0ac51745efe6d7d274729ad.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/groovy/groovy-2a49707922d39278b0093769799c4fa7.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/groovy/groovy-2a49707922d39278b0093769799c4fa7.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/sql/sql-4bb390450d0e66503b5a7869d1383245.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/sql/sql-4bb390450d0e66503b5a7869d1383245.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/cobol/cobol-ac909b3900827686f39a35ec229ff6ab.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/cobol/cobol-ac909b3900827686f39a35ec229ff6ab.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/vb/vb-aa473b75093e000adfaa1613a589006e.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/vb/vb-aa473b75093e000adfaa1613a589006e.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/r/r-01f81c317169eef804268baba9806be3.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/r/r-01f81c317169eef804268baba9806be3.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/codemirror/mode/octave/octave-8912439336c7d9b553b2165a27120837.js" src="https://hrcdn.net/hackerrank/assets/codemirror/mode/octave/octave-8912439336c7d9b553b2165a27120837.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/react/react.min-eea64396439f287e453d5edb30dc399f.js" src="https://hrcdn.net/hackerrank/assets/react/react.min-eea64396439f287e453d5edb30dc399f.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/react/react-dom.min-e9e83e86653116c0ee36ca23bc4ae537.js" src="https://hrcdn.net/hackerrank/assets/react/react-dom.min-e9e83e86653116c0ee36ca23bc4ae537.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="https://hrcdn.net/hackerrank/assets/custominput/public/bundle-2ed3b17a10984ab662833375904ae539.js" src="https://hrcdn.net/hackerrank/assets/custominput/public/bundle-2ed3b17a10984ab662833375904ae539.js"></script><base href="https://www.hackerrank.com/tests/">
  429. <title>Full Stack Developer Test :: powered by HackerRank</title>
  430. <script async="" src="https://script.hotjar.com/modules-fa7b914657f32d32df01f26b19e8f066.js"></script><style type="text/css">iframe#_hjRemoteVarsFrame {display: none !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important;}</style></head>
  431. <body id="HackerRank-main" style="zoom: 1;">
  432.  
  433. <script type="text/template" id="recruit/question-base">
  434. <textarea id="shouter" style="position: absolute !important; height: 25px; width: 25px;resize: none;" aria-live="assertive" role="alert" aria-label="Notifications will appear here" tabindex="-1"></textarea>
  435. <div class="container que-<%= question.unique_id %>" role="main" style="margin-top:30px">
  436. <div class="title-name-wrapper">
  437. <h4 class="qbookmark pull-left mmR mmT" aria-hidden="true"><a class='js-bookmark' data-qid='<%-question.unique_id%>' style="cursor:pointer" ><i class="icon-star-empty"></i></a></h4>
  438. <h3 class="title pull-left qtitle" aria-label="Question Name" tabindex="0"></h3>
  439. <h4 class="bold pull-right qpoints"></h4>
  440. <div class="clear"></div>
  441. </div>
  442. <div class="container--inner">
  443. <%if (question.type != "task"){%>
  444. <div aria-label="Question Content" class="challenge-text hrx-version ck_table-wrap fadeinContent" style="min-height:100px;"></div>
  445. <div class="clear"></div>
  446. <div class="soft-divider mlB"></div>
  447. <% if (question.type == "code") { %>
  448. <div class="mlB">
  449. <strong>YOUR ANSWER</strong>
  450. <div class="pull-right mlB hidden js-pinheader"></div>
  451. </div>
  452. <div class="clear"></div>
  453. <% } %>
  454. <div class="qcontent" style="min-height:200px;"></div>
  455. <div class="clear"></div>
  456. <% if ($.inArray(question.type, ["code", "approx", "design", "project", "android", "database", "mcq", "multiple_mcq"]) == -1) { %>
  457. <button class="btn btn-primary mdT mdB mdR ans-submit" style="width:250px;"><%= i18next.t('submit_continue') %></button>
  458. <div class="clear gray pull-right mdR" style="padding-top: 10px; text-align: left;">You can change your submission later.</div>
  459. <% } %>
  460. <% } else { %>
  461. <div class="qcontent"></div>
  462. <% } %>
  463. </div><!-- end container-inner -->
  464. </div> <!-- end .container -->
  465.  
  466. </script>
  467. <script type="text/template" id="recruit/instructiontabs">
  468. <%if (public_url) {%>
  469. <div class="container--flex">
  470. <div class="text-center">
  471. <% if(!hide_tabs){ %>
  472. <h2 class="headline">HackerRank test-taking information</h2>
  473. <div class="sub-headline">
  474. <span class="icon2-questions"></span>
  475. <span class="grey">Tips to help you take your best test on the HackerRank test-taking platform.
  476. </span>
  477. </div> <!-- .sub-headline -->
  478. <% }else{ %>
  479. <h2 class="headline">CodePair Environment</h2>
  480. <% } %>
  481. </div>
  482. <div class="to-go-top">
  483. <a class="js-gototop" href="#top"><i class="icon--single icon-up-open"></i></a>
  484. </div>
  485. <% if(!hide_tabs){ %>
  486. <div class="white-grid-block main-content" style="width:85%">
  487. <% }else{ %>
  488. <div class="white-grid-block main-content" style="width:85%;border: none">
  489. <% } %>
  490. <%}else{%>
  491. <% if(in_modal) { %>
  492. <div class="mlA">
  493. <% } else { %>
  494. <div class="container offset2" style="margin-top:63px">
  495. <div class="clearfix banner mmB mlT mlR">
  496. <p>You can refresh the page at any time. Your progress is saved on any submission.</p>
  497. </div>
  498. <% } %>
  499. <%}%>
  500.  
  501. <% if(!hide_tabs){ %>
  502. <header class="page-title">
  503. <ul class="nav-tabs nav">
  504. <% baselink="info"; if (!public_url) {%>
  505. <li id="tabinstruction" <% if (subpage == "instructions") {%>class="active" <%}%> ><a id="tabinstruction" class="js-tablink mRsmall" href="<%=baselink%>/instruction"><i class="icon-list-bullet-small"></i> Instructions</a></li>
  506. <%}%>
  507. <li id="tabui" <% if (subpage == "interface") {%>class="active" <%}%> ><a id="tabui" class="js-tablink mRsmall" href="<%=baselink%>/interface"><i class="icon-monitor"></i> Interface</a></li>
  508. <li id="tabenv" <% if (subpage == "environment") {%>class="active" <%}%> ><a id="tabenv" class="js-tablink mRsmall" href="<%=baselink%>/environment"><i class="icon-keyboard"></i> Environment</a></li>
  509. <li id="tabfaq" <% if (subpage == "faq") {%>class="active" <%}%> ><a id="tabfaq" class="js-tablink mRsmall" href="<%=baselink%>/faq"><i class="icon-help-circled"></i> F.A.Q.</a></li>
  510. <% if(in_modal) { %>
  511. <li class="no-tab pull-right">
  512. <a href="" class="btn-list close" data-dismiss="modal" aria-hidden="true"><i class="icon2-close"></i></a>
  513. </li>
  514. <% } %>
  515. </ul>
  516. </header>
  517. <% } %>
  518. <% if (!public_url) {%>
  519. <div class="js-content-tabinstruction js-content <% if (subpage != 'instructions') {%>hidden<%}%>">
  520. <h3><span class="green-title customer-title-font-color">Test Instructions</span></h3>
  521. <div class="plA mlA"> <% if (test) {%> <%= test.get('instructions')%> <% } else { %> You can add test specific instructions here <%}%></div>
  522. </div>
  523. <%}%>
  524. <div class="js-content-tabui js-content <% if (subpage != 'interface') {%>hidden<%}%>">
  525. <h3><span class="green-title customer-title-font-color">Test Interface</span></h3>
  526. <div>
  527. <a name="top"></a>
  528. <span class="challengeslist_challenge-title green-title customer-title-font-color">Table of Contents</span>
  529. <div class="boxholder" style="width: 60%;border: 1px solid #ddd;background-color: #eee;padding: 15px 0 15px 30px;">
  530. <ol class="mlL" style="line-height: 15px;">
  531. <li><a class="js-anchor" href="#browser" name="browser">Browser/internet recommendation</a></li>
  532. <li><a class="js-anchor" href="#testtaking" name="testtaking">Test-taking view</a></li>
  533. <li><a class="js-anchor" href="#disconnect" name="disconnect">Disconnections/re-logins</a></li>
  534. <li><a class="js-anchor" href="#pageload" name="pageload">Site/page does not load correctly</a></li>
  535. <li><a class="js-anchor" href="#coding" name="coding">Coding questions</a></li>
  536. <li><a class="js-anchor" href="#subjective" name="subjective">Subjective questions</a></li>
  537. <li><a class="js-anchor" href="#mcq" name="mcq">Multiple choice questions</a></li>
  538. <li><a class="js-anchor" href="#sectional" name="sectional">Sectional tests</a></li>
  539. <li><a class="js-anchor" href="#sudorank" name="sudorank">SudoRank tests</a></li>
  540. <%if (public_url) {%>
  541. <li><a class="js-anchor" href="#sample" name="sample">Sample test</a></li>
  542. <% } %>
  543. </ol>
  544. </div>
  545.  
  546. <!-- browser -->
  547. <div class="soft-divider mlA"></div>
  548. <a name="browser"></a>
  549. <h3>Browser/internet recommendation</h3>
  550. <p class="msT">For the best test-taking experience, we recommend the latest version of Google Chrome/Chromium, Mozilla Firefox, or Internet explorer (v10 or later) browsers.</p>
  551. <p class="msT">Take the test from a computer with a stable internet connection for the best experience.</p>
  552.  
  553.  
  554. <!-- test taking -->
  555. <div class="soft-divider mlA"></div>
  556. <a name="testtaking"></a>
  557. <h3>Test-taking view</h3>
  558. <p class="msT">Once logged-in, the view you'll see will be similar to below.</p>
  559. <img class="mlT" src="<%= asset_path('testtaking01.png') %>">
  560. <p class="msT">The important things to note are:
  561. <ol class="mlL mlT">
  562. <li><strong>TIMER: </strong>This counts down to the end of the test. Keep track of this as you progress in the test, and make sure you move at an optimal speed.</li>
  563. <li><strong>QUESTION LIST: </strong>These are the questions that make up the test. The right columns show which are answered, and which remain to be answered.</li>
  564. <li><strong>DONE BUTTON: </strong>Press this when you've answered all the questions, and would like to close the test. Once closed, you'll be taken to the feedback page.</li>
  565. </ol>
  566. </p>
  567. <p class="msT">When you open a question, you are presented with:
  568. <img class="mlT" src="<%= asset_path('testtaking02.png') %>">
  569. <ol class="mlL mlT">
  570. <li><strong>QUICK NAVIGATION: </strong>The sidebar allows you to move between questions quickly.</li>
  571. <li><strong>ANSWER AREA: </strong>This is where you provide an answer. This will vary depending on the question type.</li>
  572. </ol>
  573.  
  574. <div class="alert alert-info mlT">
  575. <header>WHAT HAPPENS IF THE TIMER RUNS OUT?</header>
  576. <p>If the timer runs out while you're still attempting the test, the test will be automatically closed, and you will be taken to the feedback page.</p>
  577. </div>
  578.  
  579.  
  580. <!-- disconnect -->
  581. <div class="soft-divider mlA"></div>
  582. <a name="disconnect"></a>
  583. <h3>Disconnections/re-logins</h3>
  584. <p class="msT">If something goes wrong with your computer or your internet connection gets disconnected, your previously submitted answers will not be lost. They will remain safe on our servers. You can re-login on our website and continue coding from where you left.</p>
  585. <p class="msT">However, the timer will remain running. Thus, make sure that you use a computer or a browser that you know works fine.</p>
  586.  
  587.  
  588. <!-- pageload -->
  589. <div class="soft-divider mlA"></div>
  590. <a name="pageload"></a>
  591. <h3>Site/page does not load correctly</h3>
  592. <p class="msT">Sometimes an internal page may not load correctly, due to a network issue. Such issues can be fixed by refreshing your browser window.</p>
  593.  
  594.  
  595. <!-- coding -->
  596. <div class="soft-divider mlA"></div>
  597. <a name="coding"></a>
  598. <h3>Coding questions</h3>
  599. <p class="msT">Your test may contain coding questions. They come in two types:
  600. <ol class="mlL mlT">
  601. <li><strong>COMPLETE THE FUNCTION: </strong>In these type of coding questions, you only need to write the function body, and return the required value. Inputs are provided to the function as arguments.</li>
  602. <li><strong>WRITE COMPLETE CODE: </strong>These questions will require you to write complete code. Any input will be provided on STDIN, and your output has to be provided on STDOUT.</li>
  603. </ol>
  604. </p>
  605. <p class="msT">The coding area would look like this:</p>
  606. <img class="mlT" src="<%= asset_path('testtaking04.png') %>">
  607. <p class="msT">
  608. <ul class="mlL mlT">
  609. <li>You can use the <em>Compile &amp; Test</em> button to try out your current solution, and see if provided test cases pass. You will be scored on the basis of the test cases that pass. There may be hidden test cases in questions, and the output for these will not be presented to you.</li>
  610. <li>Make sure you press "Submit" after you answer the question for it to be recorded.</li>
  611. <li>Your answers are auto-saved as draft at set intervals.</li>
  612. <li>For information on the languages our platform supports, and how to handle STDIN/STDOUT, see our <a href="/environment">environment page</a>.</li>
  613. </ul>
  614. </p>
  615. <div class="text-center mjA"><embed width="500px" height="320px" src="https://www.youtube.com/embed/0UqtoGENX8M?rel=0%22%20frameborder=%220%22"></div>
  616. <div class="alert alert-info mlT">
  617. <p>Some companies only allow certain languages in the test, so you will only be allowed to code in these allowed languages.</p>
  618. </div>
  619.  
  620.  
  621.  
  622. <!-- subjective -->
  623. <div class="soft-divider mlA"></div>
  624. <a name="subjective"></a>
  625. <h3>Subjective questions</h3>
  626. <p class="msT">Subjective questions are free-form questions. You may provide your answer in the text box provided. Your answers are auto-saved as draft at set intervals.</p>
  627. <div class="alert alert-info mlT">
  628. <header>PRO TIP</header>
  629. <p>Make sure your answer is simple, clear, answers the question, and uses correct grammar.</p>
  630. </div>
  631.  
  632.  
  633. <!-- mcq -->
  634. <div class="soft-divider mlA"></div>
  635. <a name="mcq"></a>
  636. <h3>Multiple choice questions</h3>
  637. <p class="msT">Multiple choice questions come in two types:
  638. <ol class="mlL mlT">
  639. <li><strong>MULTIPLE CHOICE: </strong>One of the answers is correct.</li>
  640. <li><strong>MULTIPLE ANSWER: </strong>One or more answers may be correct.</li>
  641. </ol>
  642. <br/>
  643. Make sure you press "Submit" after you answer the question for it to be recorded.
  644. </p>
  645.  
  646.  
  647. <!-- Sections -->
  648. <div class="soft-divider mlA"></div>
  649. <a name="sectional"></a>
  650. <h3>Sectional tests</h3>
  651. <p class="msT">Some tests have sections, where you can only attempt one section at a time and proceed. Each section is provided a limited time, and any saved time from a previous section transfers to the next section.</p>
  652. <img class="mlT" src="<%= asset_path('testtaking03.png') %>">
  653. <p class="msT">The important things to note are:
  654. <ol class="mlL mlT">
  655. <li><strong>TIMER: </strong>This counts down to the end of the section (and not the test).</li>
  656. <li><strong>QUESTION LIST: </strong>Only currently active questions can be answered. Once you move past a section, you cannot go back to it.</li>
  657. </ol>
  658. </p>
  659.  
  660. <!-- Sections -->
  661. <div class="soft-divider mlA"></div>
  662. <a name="sudorank"></a>
  663. <h3>SudoRank tests</h3>
  664. <p class="msT">Some tests are setup with access to SudoRank, the HackerRank task server interface. In these tests candidates can easily spawn up a server, obtain live shell access, and complete required tasks.</p>
  665. <p class="msT">The important things to note are:
  666. <ol class="mlL mlT">
  667. <li>Server access is provided on live servers, along with login credentials.</li>
  668. <li>Depending on how the test is setup, access to certain commands may be limited.</li>
  669. <li>Once started, the task server is only accessible for the time setup. After this time, access will be severed, and reports generated.</li>
  670. </ol>
  671. </p>
  672.  
  673.  
  674. <%if (public_url) {%>
  675. <!-- Sample -->
  676. <div class="soft-divider mlA"></div>
  677. <a name="sample"></a>
  678. <h3>Sample test</h3>
  679. <p class="msT">If you're taking a test with coding questions, you can take our publicly accessible sample test to become comfortable with the interface.</p>
  680. <p class="msT"> <a class="btn btn-green margin-large right" href="/tests/sample">Go to sample test</a></p>
  681. <% } %>
  682.  
  683. </div>
  684. </div>
  685.  
  686. <div class="js-content-tabenv js-content <% if (subpage != 'environment') {%>hidden<%}%>">
  687. <% if(!hide_tabs){ %>
  688. <h3><span class="green-title customer-title-font-color">Execution Environment</span></h3>
  689. <% } %>
  690. <div class="" id="languages"></div>
  691. <h3><span class="green-title customer-title-font-color mjT">SudoRank Environment</span></h3>
  692. <div>SudoRank servers are setup with following specifications:
  693. <ul class="mdL mdT">
  694. <li><strong>OS</strong>: Ubuntu Linux 14.04</li>
  695. <li><strong>Access</strong>: Via web based shell, or via SSH login.</li>
  696. <li><strong>Time for task</strong>: Customized in each test.</li>
  697. </ul>
  698. </div>
  699. </div>
  700.  
  701. <style> li { margin-top: 0.7em;} body{font-size:90%} p {margin-top: 0.2em;}</style>
  702. <div class="js-content-tabfaq js-content <% if (subpage != 'faq') {%>hidden<%}%>">
  703. <h3><span class="green-title customer-title-font-color">Frequently Asked Questions</span></h3>
  704. <div class="plA">
  705. <ol>
  706. <li>
  707. <strong>What browser should I use for the best experience?</strong>
  708. <p/>For the best experience you should use the latest stable versions of Chrome, Firefox, or Internet Explorer. The site will not function satisfactorily with IE9 and earlier.
  709. </li>
  710.  
  711. <li>
  712. <strong>I lost internet connectivity in the middle of my test. What do I do now?</strong>
  713. <p/>The good news is all the work you have already submitted would have been saved. They will remain safe on our servers. You can re-login on our website from the same computer or from another computer and continue coding from where you left. However the test timer will not stop ticking while you are offline. You can contact the HR who sent you the invite and tell them about your situation if you could not complete your test because of this reason. As a general guideline, you should test the computer you want to use prior to taking the test on it.
  714. </li>
  715.  
  716. <li>
  717. <strong>Can I take the Sample Test more than once?</strong>
  718. <p/>Yes. You can attempt the sample test as many times as you want. You need to use different email addresses each time.
  719. </li>
  720.  
  721. <li>
  722. <strong>A question does not load properly and I cannot see all images or widgets on the question page.</strong>
  723. <p/>If you are experiencing slow net speeds some components of the page may not load. Such issues are generally solved by refreshing your browser tab/window. Refreshing your browser tab while you are taking a test will not affect your flow. You will be brought back to exactly where you were and you can continue solving problems.
  724. </li>
  725.  
  726. <li>
  727. <strong>My Java/C#/Scala code works in my local IDE, but throws compilation errors when I do Run Code in your interface.</strong>
  728. <p/>
  729. If you're using Java/C#/Scala, you have to call your main class as Solution. This is essential to get your code to run. Please do NOT use any package names in your code.</p>
  730. </li>
  731.  
  732. <li>
  733. <strong>What are test cases? </strong>
  734. <p>Our platform runs your code against a certain number of testcases everytime you submit code. A test case consists of input data that is fed into your program, and the output expected from your program for that particular input. So, a test case succeeding means that your program produced correct output for that particular input, while a failure means it didn't produce the expected output (either wrong output or it took too long and was killed). A 'large' test case means a test case with a large input. </p>
  735. </li>
  736.  
  737. <li>
  738. <strong>After I have submitted answer to a question can I come back and change my submission? </strong>
  739. <p>Yes. You can navigate freely across the questions, and resubmit your solution to any question that is accessible by clicking on "Submit & Continue" multiple times. Please note that some tests have timed sections, and once a section time limit is reached, you will not be able to revisit questions in that section. But there is no limit on the number of times you can submit your answer to a question that you can view / edit.</p>
  740. </li>
  741.  
  742. <li>
  743. <strong>I'm forced to take the test in full screen mode. How can I escape from this?</strong>
  744. <p>Some tests have the full screen mode enabled for them in which you'll be automatically taken to a full screen as you attempt the test. You can't take these tests without the full screen. However, if you wish to navigate to another window/browser tab during the test, you can do so by pressing "Esc" or Alt+Tab. The recruiter will be aware of how many times this was done and for how long you were out of the full screen.</p>
  745. </li>
  746.  
  747. <li>
  748. <strong>Does your editor have intellisense-like autocomplete?</strong>
  749. <p>Yes; we have intelligent auto-complete similar to what is found in modern editors such as Eclipse or Visual Studio. Auto-complete will automatically trigger in languages like Java and C# at specific syntax points - like after you type "." in "System.out." You can also trigger it manually at any time using the "Ctrl-Space" key combination.</p>
  750. </li>
  751.  
  752. <li>
  753. <strong>How can I debug my program? </strong>
  754. <p>You can debug your program by printing debug statements to STDOUT. For questions that need you to write the full program your debug output will appear in the section called <em>'Your Output'</em>. In such cases you should remember to remove all your debug statements before submitting your solution, as the entire output will be matched with the expected output and your program likely will not pass the test cases. For questions that expect you to complete a function, all your print statements will be captured separately in an area called <em>'Debug Output'</em>, and they will be ignored while comparing your output with expected output.</p> <p> Many problems also allow you to give you an option to <em>'Test against custom input':</em> you can use this option to specify your own input values to run your test against. When you select this checkbox no other test cases will be executed. </p>
  755. </li>
  756.  
  757. <li>
  758. <strong>Time Limit Exceeded? </strong>
  759. <p>We look for optimal algorithms in your solutions. Every problem has been set a timelimit with respect to its optimal solution. If your code could not produce the required output within the set time limit, you get a 'Time Limit Exceeded' error. Test cases get progressively larger, so it is not uncommon for a naive solution to pass the first few (smaller) test cases and then falter when confronted with the bigger ones.</p>
  760. </li>
  761.  
  762. <li>
  763. <strong>Wrong Answer? </strong>
  764. <p>Your logic is wrong, or you have formatting issues. Make sure that the output format is exactly the same as specified in the problem statement. Check for extra/missing whitespaces/newlines/debug output statements. If a few test cases have passed, that probably means some of the later test cases have edge cases that your code is not handling. Think about every possible edge case within the problem specifications (you will never be given invalid input), and handle them. </p>
  765.  
  766. <p>If you're using Java/Clojure/Scala, please ensure that you follow the appropriate class/package naming guidelines mentioned above. These are essential to get your code to run.</p>
  767. </li>
  768.  
  769. <li id="stdin">
  770. <strong>STDIN and STDOUT</strong>
  771. <p>In most problems, you would read input from <code>STDIN</code> (Standard Input) and write output to <code>STDOUT</code> (Standard Output). Different languages have different methods of accessing <code>STDIN</code> and <code>STDOUT</code>. Please refer the sample codes below for the most common (possibly naive) methods.</p>
  772. </li>
  773. <li>
  774. <strong>How do I read from STDIN and write to STDOUT in various languages?</strong>
  775. <p/>This is best explained with a simple problem statement and solutions in different languages.
  776. <p/><br/>
  777. <h3>Problem Statement</h3>
  778. <p>
  779. Write a program that adds two numbers prints the sum to STDOUT. Read the input from STDIN. The first line of your input will contain an integer (N) that tells you how many more lines there are in the input. Each of the subsequent N lines contain 2 integers). You need to print the sum of each pair on a separate line of STDOUT.
  780. </p>
  781. <br/>
  782. <p class="fnt-wt-600">Sample Input</p>
  783. <pre>
  784. 3
  785. 1 5
  786. 3 10
  787. 999 -34343</pre>
  788. <p/>
  789. <p class="fnt-wt-600">Sample Output</p>
  790. <pre>
  791. 6
  792. 13
  793. -33344
  794. </pre>
  795.  
  796. <br/><h3>Solution</h3><br/>
  797. <p class="fnt-wt-600">C</p>
  798. <pre><xmp>#include <stdio.h>
  799. int main () {
  800. int n, i, a, b;
  801.  
  802. scanf("%d", &n);
  803. for (i = 0; i < n; ++i) {
  804. scanf("%d %d", &a, &b);
  805. printf("%d\n", a+b);
  806. }
  807. }</xmp></pre>
  808. <br>
  809. <p class="fnt-wt-600">C++</p>
  810. <pre><xmp>#include <iostream>
  811. using namespace std;
  812.  
  813. int main()
  814. {
  815. int n;
  816. cin >> n;
  817. for(int i = 0; i < n; i++) {
  818. int a, b;
  819. cin >> a >> b;
  820. cout << a+b << "\n";
  821. }
  822.  
  823. return 0;
  824. }</xmp></pre>
  825. <br>
  826. <p class="fnt-wt-600">C#</p>
  827. <pre><xmp>using System;
  828. using System.IO;
  829.  
  830. class Solution {
  831. static void Main(String[] args) {
  832. int n = Convert.ToInt32(Console.ReadLine());
  833. for(int t = 0; t < n; t++) {
  834. String str = Console.ReadLine();
  835. String[] strArr = str.Split();
  836. int a = Convert.ToInt32(strArr[0]);
  837. int b = Convert.ToInt32(strArr[1]);
  838. Console.WriteLine(a+b);
  839. }
  840. }
  841. }</xmp></pre>
  842. <br>
  843. <p class="fnt-wt-600">Java</p>
  844. <pre><xmp>
  845. import java.io.*;
  846. import java.util.*;
  847.  
  848. class Solution
  849. {
  850. public static void main(String [] args) throws Exception
  851. {
  852. Scanner sc = new Scanner(System.in);
  853. int n = sc.nextInt();
  854. for(int t = 0; t < n; t++) {
  855. int a = sc.nextInt();
  856. int b = sc.nextInt();
  857. System.out.println(a+b);
  858. }
  859. }
  860. }
  861. </xmp></pre>
  862. <br>
  863. <p class="fnt-wt-600">Objective C</p>
  864. <pre><xmp>#import<Foundation/Foundation.h>
  865.  
  866. int main(int argc, const char* argv[])
  867. {
  868. @autoreleasepool {
  869. NSInteger t;
  870. scanf("%lu", &t);
  871.  
  872. for (NSInteger i = 0; i < t; i++) {
  873. NSInteger a, b;
  874. scanf("%lu %lu", &a, &b);
  875.  
  876. /*
  877. * Do not use NSLog to print to stdout
  878. */
  879. printf("%lu\n", a + b);
  880. }
  881.  
  882. return 0;
  883. }
  884. }</xmp></pre>
  885. <br>
  886. <p class="fnt-wt-600">Python</p>
  887. <pre><xmp>n = int(raw_input())
  888. for i in range(0,n):
  889. a, b = raw_input().split()
  890. print int(a) + int(b)</xmp></pre>
  891. <br>
  892. <p class="fnt-wt-600">Python 3</p>
  893. <pre><xmp>n = int(input())
  894. for i in range(n):
  895. a, b = input().strip().split(' ')
  896. print (int(a) + int(b))</xmp></pre>
  897. <br>
  898. <p class="fnt-wt-600">Ruby</p>
  899. <pre><xmp>n = gets.to_i
  900. (0...n).each do |i|
  901. lis = gets.strip.split(" ")
  902. a = lis[0].to_i
  903. b = lis[1].to_i
  904. puts a + b
  905. end</xmp></pre>
  906. <br>
  907. <p class="fnt-wt-600">PHP</p>
  908. <pre><xmp><?php
  909. $handle = fopen ("php://stdin","r");
  910. $t = fgets($handle);
  911. for($i=0; $i<$t; $i++)
  912. {
  913. $lis = split(' ', fgets($handle));
  914. print($lis[0] + $lis[1]) . "\n";
  915. }
  916. fclose($handle);
  917. ?></xmp></pre>
  918. <br>
  919. <p class="fnt-wt-600">Javascript</p>
  920. <pre><xmp>
  921. process.stdin.resume();
  922. process.stdin.setEncoding('ascii');
  923.  
  924. var __input_stdin = "";
  925. var __input_stdin_array = "";
  926. var __input_currentline = 0;
  927.  
  928. process.stdin.on('data', function (data) {
  929. __input_stdin += data;
  930. });
  931.  
  932. process.stdin.on('end', function () {
  933. __input_stdin_array = __input_stdin.split("\n");
  934. var res;
  935. var n = parseInt(__input_stdin_array[__input_currentline].trim(), 10);
  936. __input_currentline += 1;
  937. for (var i = 0; i<n;i++) {
  938. var _line = __input_stdin_array[__input_currentline].trim();
  939. __input_currentline += 1;
  940. var line = _line.split(" ");
  941. var _a = parseInt(line[0]);
  942. var _b = parseInt(line[1]);
  943. res = _a + _b;
  944. process.stdout.write(""+res+"\n");
  945. }
  946. });</xmp></pre>
  947. <br>
  948. <p class="fnt-wt-600">Clojure</p>
  949. <pre><xmp>(use '[clojure.string :only (split triml)])
  950. (def n (Integer/parseInt (read-line)))
  951.  
  952. (loop [i 0]
  953. (when (< i n)
  954. (def a (read-line))
  955. (def new (split a #"\s+"))
  956. (println ( + (Integer/parseInt (get new 0)) (Integer/parseInt (get new 1)) ))
  957. (recur (inc i))
  958. ))</xmp></pre>
  959. <br>
  960. <p class="fnt-wt-600">Perl</p>
  961. <pre><xmp>$n = <>;
  962. for($i=0; $i<$n; $i++)
  963. {
  964. $lis = <>;
  965. @ll = split(' ', $lis);
  966. print $ll[0] + $ll[1];
  967. print "\n";
  968. }</xmp></pre>
  969. <br>
  970. <p class="fnt-wt-600">Haskell</p>
  971. <pre><xmp>import Control.Monad
  972.  
  973. main :: IO ()
  974. main = do
  975. n <- readLn :: IO Int
  976. str <- replicateM n getLine
  977. let
  978. ans = map (sum. map read. words) str
  979. mapM_ print ans</xmp></pre>
  980. <br>
  981. <p class="fnt-wt-600">Erlang</p>
  982. <pre><xmp>-module(solution).
  983.  
  984. -export([main/0]).
  985.  
  986. main() ->
  987. {ok, [N]} = io:fread("", "~d"),
  988. test(N).
  989.  
  990. test(0) -> ok;
  991. test(N) ->
  992. {ok, [A, B]} = io:fread("", "~d ~d"),
  993. io:fwrite("~w~n", [(A + B)]),
  994. test(N-1).
  995. </xmp></pre>
  996. <br>
  997. <p class="fnt-wt-600">Go Lang</p>
  998. <pre><xmp>package main
  999. import "fmt"
  1000.  
  1001. func main() {
  1002. var n int
  1003. var a int
  1004. var b int
  1005. fmt.Scan(&n)
  1006.  
  1007. for i := 0; i < n; i++ {
  1008. var sum int
  1009. fmt.Scan(&a,&b)
  1010. sum = a+b
  1011. fmt.Println(uint(sum))
  1012. }
  1013. }</xmp></pre>
  1014. <br>
  1015. <p class="fnt-wt-600">Groovy</p>
  1016. <pre><xmp>BufferedReader br = new BufferedReader(new InputStreamReader(System.in))
  1017. def a,b, res,line
  1018. def n = Integer.parseInt(br.readLine())
  1019. for (int i = 0; i < n; i++) {
  1020. line = br.readLine()
  1021. def (_a,_b) = line.split(' ')
  1022. a = Integer.parseInt(_a)
  1023. b = Integer.parseInt(_b)
  1024. res = a+b
  1025. println res
  1026. }</xmp></pre>
  1027. <br>
  1028. <p class="fnt-wt-600">Scala</p>
  1029. <pre><xmp>object Solution extends App {
  1030. val n = readInt
  1031. //recommended
  1032. (1 to n).map(i => readLine.split(" ").map(_.toInt).sum).foreach(println)
  1033.  
  1034. /*
  1035. another way
  1036. for (i <- 1 to n) {
  1037. val Array(a, b) = readLine.split(" ").map(_.toInt)
  1038. println(a + b)
  1039. }
  1040. */
  1041. }</xmp></pre>
  1042. <br>
  1043. <p class="fnt-wt-600">R</p>
  1044. <pre><xmp>f <- file("stdin")
  1045. open(f)
  1046.  
  1047. count = as.numeric(readLines(f, n = 1))
  1048.  
  1049. for(i in 1:count) {
  1050. lines <- readLines(f, n = 1)
  1051. num <- strsplit(lines, " ")[[1]]
  1052. sum <- as.numeric(num[1]) + as.numeric(num[2])
  1053. write(sum, stdout())
  1054. }
  1055. </xmp></pre>
  1056. <br>
  1057. <p class="fnt-wt-600">Swift</p>
  1058. <pre><xmp>import Foundation
  1059.  
  1060. let t = Int(readLine()!)!
  1061.  
  1062. for i in 1...t {
  1063. let nums = readLine()!.characters.split(" ").map{Int(String($0))!}
  1064. let a = nums[0]
  1065. let b = nums[1]
  1066.  
  1067. print(a + b)
  1068. }
  1069. </xmp></pre>
  1070. </ol>
  1071. </div>
  1072. </div>
  1073. </div>
  1074. <%if (public_url) {%>
  1075. </div>
  1076. <%}%>
  1077. </div>
  1078.  
  1079. </script>
  1080. <script type="text/template" id="recruit/question-correcterrors">
  1081. <div class="span13">
  1082. <div id="ques" class="span16 msB"><%= question %></div>
  1083. <textarea class="span16" id="answer" autocomplete="off"></textarea>
  1084. </div>
  1085. <div class="clear"></div>
  1086. </script>
  1087. <script type="text/template" id="recruit/multiple-mcq">
  1088. <div class="multiple-mcq-container" aria-label="List of MCQ questions" tabindex="0">
  1089. <% for(var i = 0; i < qArr.length; i++) { %>
  1090. <div class="mcq-container mcq-<%= qArr[i].id %>"></div>
  1091. <% } %>
  1092. <button class="btn btn-primary mdT mdB mdR ans-submit mcqs-submit"><%= i18next.t('continue')%></button>
  1093. </div>
  1094.  
  1095. </script>
  1096. <script type="text/template" id="recruit/sudorank">
  1097. <div class="js-alert">
  1098. </div>
  1099. </script>
  1100. <script type="text/template" id="recruit/fbresume">
  1101. <div>
  1102. <center>
  1103. <h2 class="headline"><%- test.name %></h2>
  1104. <h3 class="msT"><%- data.name %></h3>
  1105. <div class="sub-headline">
  1106. <span class="icon-mail"></span><span class="grey"><%- data.email %></span>
  1107. <%if(data.location){%>
  1108. <span class="mdL icon-location"></span><span class="grey"><%- data.location.name %></span>
  1109. <%}%>
  1110. </div> <!-- .sub-headline -->
  1111.  
  1112. </center>
  1113. <div class="white-grid-block main-content">
  1114. <h3 class="msB">PROFILE</h3>
  1115. <textarea class="fw tall resizex userprofile" placeholder="Enter a brief description about you here."></textarea>
  1116. <h3 class="mlT msB">PROFESSIONAL EXPERIENCE</h3>
  1117. <%if(data.work){ %>
  1118. <div class="table-wrap">
  1119. <header class="row">
  1120. <div class="span8">Position</div>
  1121. <div class="span2">Year</div>
  1122. </header>
  1123. <div class="table-body">
  1124. <%_.each(data.work, function(w){%>
  1125. <div class="row">
  1126. <div class="span8"><%if(w.position){%><%-w.position.name%><%}%>
  1127. <span class="grey">
  1128. <%if(w.employer){%> <%-w.employer.name%><%}%>
  1129. <%if(w.location){%> (<em><%-w.location.name%></em>)<%}%>
  1130. </span>
  1131. </div>
  1132. <div class="span2"><%if(w.start_date){%><%-w.start_date%><%}%>
  1133. <%if(w.end_date){%>&mdash;<%-w.end_date%><%}%>
  1134. </div>
  1135. </div>
  1136. <%});%>
  1137. </div></div>
  1138. <%}else{%>
  1139. <span class="grey"><em>None found.</em></span>
  1140. <%}%>
  1141. <div class="soft-divider mjB"></div>
  1142. <h3 class="mlT msB">EDUCATION</h3>
  1143. <%if(data.education){ %>
  1144. <div class="table-wrap">
  1145. <header class="row">
  1146. <div class="span8">Class</div>
  1147. <div class="span2">Year</div>
  1148. </header>
  1149. <div class="table-body">
  1150. <%_.each(data.education, function(e){%>
  1151. <div class="row">
  1152. <div class="span8"><%if(e.school){%><%-e.school.name%><%}%>
  1153. <span class="grey">
  1154. <%if(e.type){%> (<em><%-e.type%></em>)<%}%>
  1155. </span>
  1156. </div>
  1157. <div class="span2"><%if(e.year){%><%-e.year.name%><%}else{%><span class="grey">&mdash;</span><%}%>
  1158. </div>
  1159. </div>
  1160. <%});%>
  1161. </div></div>
  1162. <%}else{%>
  1163. <span class="grey"><em>None found.</em></span>
  1164. <%}%>
  1165. <div class="soft-divider mjB"></div>
  1166. <center>
  1167. <button class="btn mdB btn-primary btn-large btn-blue starttest"><i class="mdR icon--single icon-facebook"></i>Confirm resume &amp; start test</button>
  1168. </center>
  1169. </div>
  1170.  
  1171. <center>
  1172. <div class="block">
  1173. <img class="mlT" src=<%= asset_path('brand/powered_by_transparent.png') %> />
  1174. <% if (test.logged_in && test.attempt_done) { %>
  1175. <p class="text-center txt-alt-grey">
  1176. Love Programming challenges? </br>
  1177. Find more problems and contests at <strong><a href="https://www.hackerrank.com/" class="txt-alt-grey">www.hackerrank.com</a></strong>
  1178. </p>
  1179.  
  1180. <% } %>
  1181. </div>
  1182. </center>
  1183.  
  1184. </div><!-- end .row -->
  1185. <div id="fb-root"></div>
  1186.  
  1187. </script>
  1188. <script type="text/template" id="recruit/candidatewebcam">
  1189. <div>
  1190. <center>
  1191. <h2 class="headline">
  1192. <span class='test-name'><%- (test.name) %></span>
  1193. </h2>
  1194. <div class="sub-headline" aria-level="1" aria-label="Details">
  1195. <% if (test['task_test']) { %>
  1196. <span class="icon-monitor" style="opacity:0.5"></span><span class="grey" aria-level="1"> SERVER TASK</span>
  1197. <span class="ico-time"></span>
  1198. <span class="grey test-duration" aria-level="1"><%- test.task_time %> <%- pluralize('MINUTE', test.task_time) %> </span>
  1199. <% } else { %>
  1200. <span class="ico-questions"></span>
  1201. <span class="grey" aria-level="1"><%- test.questions_count %> <%- pluralize('QUESTION', test.questions_count) %>
  1202. <% if (test.sectional) { %> (<%= i18next.t('login.with_sections') %>) <% } %>
  1203. </span>
  1204. <span class="ico-time"></span>
  1205. <span class="grey test-duration" aria-level="1"><%- test.duration %> <%- pluralize('MINUTE', test.duration) %> </span>
  1206. <% } %>
  1207. </div> <!-- .sub-headline -->
  1208. </center>
  1209. <div class="white-grid-block main-content" style="padding: 30px 40px;width: 715px;text-align:left">
  1210. <span class="challengeslist_challenge-title green-title customer-title-font-color msT">INSTRUCTIONS</span>
  1211. <div class="challenge-text hrx-version pdB">
  1212. <%= test.instructions %>
  1213. </div>
  1214. <div class="soft-divider mjB"></div>
  1215. <div class="alert mjA" aria-level="1" aria-label="Note">
  1216. <header>Note: Proctoring required for this challenge.</header>
  1217. <ul class="pjL mjL mlR">
  1218. <li>This challenge requires access to the webcamera.</li>
  1219. <li>Webcam snapshots will be taken periodically when you're inside the challenge. Please enable access by clicking the button below.</li>
  1220. </ul>
  1221. </div>
  1222. <center>
  1223. <div class="js-webcam-holder hidden" style="width:320px;height:240px;background-color:#444;"></div>
  1224. <button class="btn mjA btn-primary btn-large js-enable-webcam" role="button">Enable webcam access</button>
  1225. <div class="js-errortext hidden mdA">
  1226. Error: Unable to get access to camera.<br><br>If you have a camera on this computer, please enable access for this tab. If you do not have a webcamera, you can take the test from a different computer.
  1227. </div>
  1228. <div class="js-successtext hidden mdA">
  1229. Webcam turned on. Please ensure your image is clear, and then proceed to the test.<br>
  1230. <button class="btn mjA btn-primary js-gototest" role="button">Proceed to test</button>
  1231. </div>
  1232. </center>
  1233. </div>
  1234.  
  1235. <center>
  1236. <div class="block">
  1237. <img class="mlT" src="<%= asset_path('brand/powered_by_transparent.png') %>" />
  1238. <% if (test.logged_in && test.attempt_done) { %>
  1239. <p class="text-center txt-alt-grey">
  1240. Love Programming challenges? </br>
  1241. Find more problems and contests at <strong><a href="https://www.hackerrank.com/" class="txt-alt-grey">www.hackerrank.com</a></strong>
  1242. </p>
  1243.  
  1244. <% } %>
  1245. </div>
  1246. </center>
  1247.  
  1248. </div><!-- end .row -->
  1249.  
  1250. </script>
  1251. <script type="text/template" id="recruit/input-output-info-view">
  1252. <div id="sample-input-output">
  1253. <div class="associated-items cf">
  1254. <input type="checkbox" class="associated-items-checkbox" id="associated-items-checkbox"/>
  1255. <i class='glyphicon-chevron-left'></i>
  1256. <label class="associated-items-header" for="associated-items-checkbox">
  1257. <i class="icon-info-circled mlL"></i>
  1258. <span class="associated-items-header-text items"><%= i18next.t('question.code.help_read_input_output', {language: language, }) %>.</span>
  1259. <div class="js-close-notification pull-right pmA mlR close">&times;</div>
  1260. </label>
  1261. <div class="associated-items-list">
  1262. <div class="associated-item">
  1263. <a class="backbone js-show-faq" href="">Click here</a> to know more about handling STDIN and STDOUT in other languages.</div>
  1264. <div class="associated-item">
  1265. <p class="fnt-wt-600">Sample Problem:</p> Write a program that adds two numbers prints the sum to STDOUT. Read the input from STDIN. The first line of your input will contain an integer (N) that tells you how many more lines there are in the input. Each of the subsequent N lines contain 2 integers). You need to print the sum of each pair on a separate line of STDOUT.
  1266. </div>
  1267. <div class="associated-item"><p class="fnt-wt-600">Sample Input:</p><pre>
  1268. 3
  1269. 1 5
  1270. 3 10
  1271. 999 -34343</pre>
  1272. </div>
  1273. <div class="associated-item">
  1274. <p class="fnt-wt-600">Sample Output:</p>
  1275. <pre>
  1276. 6
  1277. 13
  1278. -33344</pre>
  1279. </div>
  1280. <div class="associated-item">
  1281. <p class="fnt-wt-600">SOLUTION CODE:</p>
  1282. </div>
  1283. <div class="associated-item hidden cpp"><pre><xmp>#include <iostream>
  1284. using namespace std;
  1285.  
  1286. int main()
  1287. {
  1288. int n;
  1289. cin >> n;
  1290. for(int i = 0; i < n; i++) {
  1291. int a, b;
  1292. cin >> a >> b;
  1293. cout << a+b << "\n";
  1294. }
  1295.  
  1296. return 0;
  1297. }</xmp></pre></div>
  1298. <div class="associated-item hidden c"><pre><xmp>#include <stdio.h>
  1299. int main () {
  1300. int n, i, a, b;
  1301.  
  1302. scanf("%d", &n);
  1303. for (i = 0; i < n; ++i) {
  1304. scanf("%d %d", &a, &b);
  1305. printf("%d\n", a+b);
  1306. }
  1307. }</xmp></pre></div>
  1308. <div class="associated-item hidden csharp"><pre><xmp>using System;
  1309. using System.IO;
  1310.  
  1311. class Solution {
  1312. static void Main(String[] args) {
  1313. int n = Convert.ToInt32(Console.ReadLine());
  1314. for(int t = 0; t < n; t++) {
  1315. String str = Console.ReadLine();
  1316. String[] strArr = str.Split();
  1317. int a = Convert.ToInt32(strArr[0]);
  1318. int b = Convert.ToInt32(strArr[1]);
  1319. Console.WriteLine(a+b);
  1320. }
  1321. }
  1322. }</xmp></pre></div>
  1323. <div class="associated-item hidden java">
  1324. <pre><xmp>
  1325. import java.io.*;
  1326. import java.util.*;
  1327.  
  1328. class Solution
  1329. {
  1330. public static void main(String [] args) throws Exception
  1331. {
  1332. Scanner sc = new Scanner(System.in);
  1333. int n = sc.nextInt();
  1334. for(int t = 0; t < n; t++) {
  1335. int a = sc.nextInt();
  1336. int b = sc.nextInt();
  1337. System.out.println(a+b);
  1338. }
  1339. }
  1340. }
  1341. </xmp></pre></div>
  1342.  
  1343. <div class="associated-item hidden objectivec">
  1344. <pre><xmp>#import<Foundation/Foundation.h>
  1345.  
  1346. int main(int argc, const char* argv[])
  1347. {
  1348. @autoreleasepool {
  1349. NSInteger t;
  1350. scanf("%lu", &t);
  1351.  
  1352. for (NSInteger i = 0; i < t; i++) {
  1353. NSInteger a, b;
  1354. scanf("%lu %lu", &a, &b);
  1355.  
  1356. /*
  1357. * Do not use NSLog to print to stdout
  1358. */
  1359. printf("%lu\n", a + b);
  1360. }
  1361.  
  1362. return 0;
  1363. }
  1364. }</xmp></pre></div>
  1365.  
  1366. <div class="associated-item hidden swift">
  1367. <pre><xmp>import Foundation
  1368.  
  1369. let t = Int(readLine()!)!
  1370.  
  1371. for i in 1...t {
  1372. let nums = readLine()!.components(separatedBy: " ").map{ Int($0)! }
  1373. let a = nums[0]
  1374. let b = nums[1]
  1375.  
  1376. print(a + b)
  1377. }
  1378. </xmp></pre></div>
  1379.  
  1380. <div class="associated-item hidden python">
  1381. <pre><xmp>n = int(raw_input())
  1382. for i in range(0,n):
  1383. a, b = raw_input().split()
  1384. print int(a) + int(b)</xmp></pre>
  1385. </div>
  1386.  
  1387. <div class="associated-item hidden python3">
  1388.  
  1389. <br>
  1390. <p class="fnt-wt-600">Python 3</p>
  1391. <pre><xmp>n = int(input())
  1392. for i in range(n):
  1393. a, b = input().strip().split(' ')
  1394. print (int(a) + int(b))</xmp></pre>
  1395. </div>
  1396.  
  1397. <div class="associated-item hidden ruby">
  1398. <br>
  1399. <p class="fnt-wt-600">Ruby</p>
  1400. <pre><xmp>n = gets.to_i
  1401. (0...n).each do |i|
  1402. lis = gets.strip.split(" ")
  1403. a = lis[0].to_i
  1404. b = lis[1].to_i
  1405. puts a + b
  1406. end</xmp></pre>
  1407. </div>
  1408.  
  1409. <div class="associated-item hidden php">
  1410. <pre><xmp><?php
  1411. $handle = fopen ("php://stdin","r");
  1412. $t = fgets($handle);
  1413. for($i=0; $i<$t; $i++)
  1414. {
  1415. $lis = split(' ', fgets($handle));
  1416. print($lis[0] + $lis[1]) . "\n";
  1417. }
  1418. fclose($handle);
  1419. ?></xmp></pre></div>
  1420.  
  1421. <div class="associated-item hidden javascript">
  1422. <pre><xmp>
  1423. process.stdin.resume();
  1424. process.stdin.setEncoding('ascii');
  1425.  
  1426. var __input_stdin = "";
  1427. var __input_stdin_array = "";
  1428. var __input_currentline = 0;
  1429.  
  1430. process.stdin.on('data', function (data) {
  1431. __input_stdin += data;
  1432. });
  1433.  
  1434. process.stdin.on('end', function () {
  1435. __input_stdin_array = __input_stdin.split("\n");
  1436. var res;
  1437. var n = parseInt(__input_stdin_array[__input_currentline].trim(), 10);
  1438. __input_currentline += 1;
  1439. for (var i = 0; i<n;i++) {
  1440. var _line = __input_stdin_array[__input_currentline].trim();
  1441. __input_currentline += 1;
  1442. var line = _line.split(" ");
  1443. var _a = parseInt(line[0]);
  1444. var _b = parseInt(line[1]);
  1445. res = _a + _b;
  1446. process.stdout.write(""+res+"\n");
  1447. }
  1448. });</xmp></pre></div><div class="associated-item hidden clojure">
  1449. <pre><xmp>(use '[clojure.string :only (split triml)])
  1450. (def n (Integer/parseInt (read-line)))
  1451.  
  1452. (loop [i 0]
  1453. (when (< i n)
  1454. (def a (read-line))
  1455. (def new (split a #"\s+"))
  1456. (println ( + (Integer/parseInt (get new 0)) (Integer/parseInt (get new 1)) ))
  1457. (recur (inc i))
  1458. ))</xmp></pre></div><div class="associated-item hidden perl">
  1459. <br>
  1460. <p class="fnt-wt-600">Perl</p>
  1461. <pre><xmp>$n = <>;
  1462. for($i=0; $i<$n; $i++)
  1463. {
  1464. $lis = <>;
  1465. @ll = split(' ', $lis);
  1466. print $ll[0] + $ll[1];
  1467. print "\n";
  1468. }</xmp></pre></div><div class="associated-item hidden haskell">
  1469. <pre><xmp>import Control.Monad
  1470.  
  1471. main :: IO ()
  1472. main = do
  1473. n <- readLn :: IO Int
  1474. str <- replicateM n getLine
  1475. let
  1476. ans = map (sum. map read. words) str
  1477. mapM_ print ans</xmp></pre>
  1478. <br>
  1479. <p class="fnt-wt-600">Erlang</p>
  1480. <pre><xmp>-module(solution).
  1481.  
  1482. -export([main/0]).
  1483.  
  1484. main() ->
  1485. {ok, [N]} = io:fread("", "~d"),
  1486. test(N).
  1487.  
  1488. test(0) -> ok;
  1489. test(N) ->
  1490. {ok, [A, B]} = io:fread("", "~d ~d"),
  1491. io:fwrite("~w~n", [(A + B)]),
  1492. test(N-1).
  1493. </xmp></pre></div><div class="associated-item hidden go">
  1494. <br>
  1495. <p class="fnt-wt-600">Go Lang</p>
  1496. <pre><xmp>package main
  1497. import "fmt"
  1498.  
  1499. func main() {
  1500. var n int
  1501. var a int
  1502. var b int
  1503. fmt.Scan(&n)
  1504.  
  1505. for i := 0; i < n; i++ {
  1506. var sum int
  1507. fmt.Scan(&a,&b)
  1508. sum = a+b
  1509. fmt.Println(uint(sum))
  1510. }
  1511. }</xmp></pre></div><div class="associated-item hidden groovy">
  1512. <br>
  1513. <p class="fnt-wt-600">Groovy</p>
  1514. <pre><xmp>BufferedReader br = new BufferedReader(new InputStreamReader(System.in))
  1515. def a,b, res,line
  1516. def n = Integer.parseInt(br.readLine())
  1517. for (int i = 0; i < n; i++) {
  1518. line = br.readLine()
  1519. def (_a,_b) = line.split(' ')
  1520. a = Integer.parseInt(_a)
  1521. b = Integer.parseInt(_b)
  1522. res = a+b
  1523. println res
  1524. }</xmp></pre></div><div class="associated-item hidden scala">
  1525. <pre><xmp>object Solution extends App {
  1526. val n = readInt
  1527. //recommended
  1528. (1 to n).map(i => readLine.split(" ").map(_.toInt).sum).foreach(println)
  1529.  
  1530. /*
  1531. another way
  1532. for (i <- 1 to n) {
  1533. val Array(a, b) = readLine.split(" ").map(_.toInt)
  1534. println(a + b)
  1535. }
  1536. */
  1537. }</xmp></pre></div><div class="associated-item hidden r">
  1538. <br>
  1539. <p class="fnt-wt-600">R</p>
  1540. <pre><xmp>f <- file("stdin")
  1541. open(f)
  1542.  
  1543. count = as.numeric(readLines(f, n = 1))
  1544.  
  1545. for(i in 1:count) {
  1546. lines <- readLines(f, n = 1)
  1547. num <- strsplit(lines, " ")[[1]]
  1548. sum <- as.numeric(num[1]) + as.numeric(num[2])
  1549. write(sum, stdout())
  1550. }
  1551. </xmp></pre></div>
  1552. <div class="associated-item hidden default">Sorry, we don't have sample code yet in this language.</div>
  1553. </div>
  1554. </div>
  1555. </div>
  1556. <div class="modal modal-huge" id="faq-modal">
  1557. <div class="modal-body"></div>
  1558. </div>
  1559.  
  1560. </script>
  1561. <script type="text/template" id="recruit/question-design-csx">
  1562. <div id="csx-editor" class="lightTheme designQuestion"></div>
  1563.  
  1564. <div class="span16 csx-ctagroup">
  1565. <button class="btn btn-primary bb-submit ans-submit pull-right" data-analytics="Submit Code">Submit code &amp; Continue</button>
  1566. <button class="btn bb-compile msR pull-right" data-analytics="Compile and Test">Render</button>
  1567. </div>
  1568.  
  1569. <div class="output-group">
  1570.  
  1571. <div class="span16 output-area-wrap hidden csx-design-outputstat">
  1572. <div class="output-area padded light-wrap" id="output-area">
  1573. <p class="status">Status: <span class="status-msg">Uploading..</span></p>
  1574. </div>
  1575. </div>
  1576.  
  1577. <div class="span16 hidden center-block light-wrap" style="height:600px;" id="runstatus-load">
  1578. <div class='gray'> <div style='background: url(<%- asset_path('hackerrank_spinner_64x64.gif') %>); height: 64px; width: 64px; display: inline-block;'></div> </div>
  1579. </div>
  1580. <iframe class="span16 no-padding hidden light-wrap" sandbox="allow-forms allow-popups allow-scripts allow-same-origin" height="600px" name="runstatus" id="runstatus" src="">
  1581. </iframe>
  1582. </div>
  1583.  
  1584. </script>
  1585. <script type="text/template" id="recruit/awaitingserver">
  1586. <div>
  1587. <div class="text-center">
  1588. <h2 class="headline">
  1589. <% if (test.logo) { %>
  1590. <img src="<%= test.logo %>" /><br/>
  1591. <% } %>
  1592. <span class='test-name'>
  1593. <%- test.name %>
  1594. </span>
  1595. </h2>
  1596. <div class="sub-headline">
  1597. <%if (test['task_test']){%>
  1598. <span class="icon-monitor" style="opacity:0.5"></span><span class="grey"> SERVER TASK</span>
  1599. <span class="icon-clock"></span>
  1600. <span class="grey test-duration"><%- test.task_time %> <%- pluralize('MINUTE', test.task_time) %> </span>
  1601. <%} else {%>
  1602. <span class="icon2-questions"></span>
  1603. <span class="grey"><%- test.questions_count %> <%- pluralize('QUESTION', test.questions_count) %>
  1604. <% if (test.sectional) {%> (<%= i18next.t('login.with_sections') %>)<%}%>
  1605. </span>
  1606. <span class="icon-clock"></span>
  1607. <span class="grey test-duration"><%- test.duration %> <%- pluralize('MINUTE', test.duration) %> </span>
  1608. <%}%>
  1609. </div> <!-- .sub-headline -->
  1610. </div>
  1611.  
  1612. <div class="white-grid-block main-content mdT" style="padding: 30px 40px;width: 715px;text-align:left">
  1613. <h3>Launching server, Please wait.. <img src="<%= asset_path('hackerrank_spinner_64x64.gif') %>" height="24" width="24"/> </h3>
  1614. <p class="mdT">We are bringing up a new server for this test. This can take a few minutes. (Lost time will be added back to the test)</p>
  1615. </div> <!-- .white-grid-block main-content -->
  1616. </div><!-- end .row -->
  1617.  
  1618. </script>
  1619. <script type="text/template" id="recruit/candidate-login">
  1620. <p aria-live="assertive" role="alert" id="shouter" style="position: absolute !important; top: -1000px !important;" tabindex="-1"></p>
  1621. <div class="<%- (test.logged_in && test.attempt_done) ? 'feedback-v2' : '' %>">
  1622. <div class="text-center">
  1623. <h2 class="headline">
  1624. <% if (test.logo) { %>
  1625. <img src="<%= test.logo %>" class="test-logo" /><br/>
  1626. <% } %>
  1627. <span class='test-name' onload="focus()">
  1628. <%- test.name %>
  1629. </span>
  1630. </h2>
  1631. <div class="hidden feedback-message-done"></div>
  1632. <% if (test.logged_in && test.attempt_done) { %>
  1633. <div class="feedback-message clearfix">
  1634. <div>
  1635. <img src="<%= asset_path('candidate_assets/candidate_feedback.png') %> "/>
  1636. </div>
  1637. <h3 class="text-center mdA">
  1638. <%- test.name %>
  1639. </h3>
  1640. <p class="bold mdT" aria-level="1">
  1641. Your test has been successfully submitted
  1642. </p>
  1643. <p class="mdT mlB text-center" aria-level="1">
  1644. <% if (test.test_finish_url && test.redirect_after_feedback != true) { %>
  1645. Thank you for taking the test. You will be redirected shortly, please do not close this window.
  1646. <% } else if (test.feedback_message) { %>
  1647. <%= test.feedback_message %>
  1648. <% } else if (!common_app_id ) { %>
  1649. <p class="span10 offset-sm-3 mlB"><%- test.company_name %> has received your test report. If you would like to contact them, please go to the invitation e-mail you received and select "Reply All".</p>
  1650. <% }%>
  1651. </p>
  1652. </div>
  1653. <% } else { %>
  1654. <div class="sub-headline js-sub-headline" aria-level="1" aria-label="Details">
  1655. <% if (test['task_test']) { %>
  1656. <span class="icon-monitor" style="opacity:0.5"></span><span class="grey" aria-level="1"> SERVER TASK</span>
  1657. <span class="ico-time"></span>
  1658. <span class="grey test-duration" aria-level="1"><%- test.task_time %> <%- pluralize('MINUTE', test.task_time) %> </span>
  1659. <% } else { %>
  1660. <span class="ico-questions"></span>
  1661. <% if(!_.isEmpty(test.questions_list)) { %>
  1662. <a href="#" class="grey js-questions-num questions-num" aria-level="1"><%- test.questions_count %> <%- pluralize('QUESTION', test.questions_count) %>
  1663. <% if (test.sectional) { %> (<%= i18next.t('login.with_sections') %>) <% } %>
  1664. </a>
  1665. <% } else { %>
  1666. <span class="grey" aria-level="1"><%- test.questions_count %> <%- pluralize('QUESTION', test.questions_count) %>
  1667. <% if (test.sectional) { %> (<%= i18next.t('login.with_sections') %>) <% } %>
  1668. </span>
  1669. <% } %>
  1670. &#9679;
  1671. <span class="ico-time" aria-hidden="true"></span>
  1672. <span class="grey test-duration" aria-level="1"><%- test.duration %> <%- pluralize('MINUTE', test.duration) %> </span>
  1673. &#9679;
  1674. <a href="info/interface" target="_blank"><span class="icon-help-circled"></span><span class="grey test-duration text-uppercase" aria-level="1"><%= i18next.t('login.platform_help') %></span></a>
  1675. <% } %>
  1676. </div> <!-- .sub-headline -->
  1677. <% if(test.instructions.indexOf('/tests/sample') >= 0) { %>
  1678. <div class="sub-headline white-grid-block sample-test-message">
  1679. <span>We recommend you take the <a href='https://www.hackerrank.com/tests/sample?utm_source=login_page_sample_test&utm_medium=link&utm_content=login_link&utm_campaign=sample_test' target="_blank">Sample Test</a> first to familiarise yourself with our environment.</span>
  1680. </div>
  1681. <% } %>
  1682. <% } %>
  1683. </div>
  1684.  
  1685. <div class="white-grid-block main-content" aria-level="1" style="padding: 20px 40px;width: 715px;text-align:left">
  1686. <% if (!test.logged_in) { %>
  1687. <!--<div class="clearfix">-->
  1688. <div class="js-tabview"></div>
  1689.  
  1690. <span class="challengeslist_challenge-title green-title customer-title-font-color msT"><%- i18next.t('login.instructions') %></span>
  1691. <div class="challenge-text hrx-version pdB">
  1692. <%= test.instructions %>
  1693. </div>
  1694. <% if (test.sectional) { %>
  1695. <div class="alert mjA" aria-level="1" aria-label="Note">
  1696. <header>Note: <%= i18next.t('login.sections_in_test') %></header>
  1697. <ul class="pjL mjL mlR js-sectionsinfo">
  1698. <li><%= i18next.t('login.sections_with_alloted_time') %></li>
  1699. </ul>
  1700. </div>
  1701.  
  1702. <% } %>
  1703.  
  1704. <% if(test.sudorank_test) { %>
  1705. <div class="alert mjA" aria-level="1" aria-label="Note">
  1706. <header>SSH command shell/terminal required</header>
  1707. <p>This test has questions that would need you to login into a remote server. Please have a terminal program available before starting the test. Example programs:</p>
  1708. <ul class="pjL plT mjL">
  1709. <li>Linux: Gnome terminal, Xterm</li>
  1710. <li>Windows: Putty</li>
  1711. <li>Mac OSX: Terminal</li>
  1712. </ul>
  1713. </div>
  1714. <% } %>
  1715.  
  1716. <div class="soft-divider mjB"></div>
  1717. <div class="js-error message hide mlB"><header class="text-center"></header><p></p></div>
  1718. <div class="sub-view-container">
  1719. <div class="gray-2">
  1720. <img src="<%= asset_path('hackerrank_spinner_64x64.gif') %>" style="height: 64px; width: 64px; display: inline-block;"/>
  1721. </div>
  1722. </div>
  1723.  
  1724. <% } else if (test.logged_in && !test.attempt_done) { %>
  1725. <header><%- i18next.t('login.alread_loggedin') %></header>
  1726. <p><%- i18next.t('login.alread_loggedin_to_test') %>. <a href="<%= test.unique_id + "/questions" %>" class="backbone">Go there.</a></p>
  1727.  
  1728. <% } else if (test.logged_in && test.attempt_done) { %>
  1729. <% if (test.test_finish_url && test.redirect_after_feedback != true) { %>
  1730. <% } else if (test.no_feedback && test.no_feedback == "True") { %>
  1731. <p class="text-center msT">
  1732. <button class="btn btn-primary test-submit-feedback">Logout</button>
  1733. </p>
  1734. <% } else { %>
  1735. <div class="hidden follow-loader">
  1736. <img src="<%= asset_path('hackerrank_spinner_64x64.gif') %>" style="height: 32px; width: 32px; margin-bottom: 10px; display: inline-block;"/>
  1737. </div>
  1738. <div class="follow-container hidden pull-left mjB">
  1739. <a class="btn follow-company hidden"></a><a class="btn unfollow-company hidden" style="width: 100px"></a>
  1740. <span class="hidden mlL following-text"></span>
  1741. <div class="follow-container-error error msT hidden"></div>
  1742. </div>
  1743. <div class="clearfix"></div>
  1744. <div id="product_rating" class="mdB rating feedback-rating text-center">
  1745. <div class="no-padding bold"><%- i18next.t('feedback.rate_hackerrank_experience') %></div>
  1746. <div class="star-group mdT">
  1747. <% for(i=0; i<5; i++) { %>
  1748. <i class="icon--single icon-star-empty cursor"></i>
  1749. <% } %>
  1750. </div>
  1751. </div>
  1752.  
  1753. <div class="feedback-categories"></div>
  1754. <div class="feedback-detail">
  1755. <% if (test.feedback_text_question) { %>
  1756. <p class="mdB bold"><%- test.feedback_text_question %></p>
  1757. <% } else { %>
  1758. <p class="mdB bold"><%- i18next.t('feedback.how_do_you_like_questions') %></p>
  1759. <% } %>
  1760. <textarea name="candidate-comment" rows="3" style="width:100%; max-width: 100%;" class="feedback-text"></textarea>
  1761.  
  1762. <br>
  1763. <p class="msT text-center">
  1764. <button class="btn btn-primary btn-flat test-submit-feedback"><%- i18next.t('feedback.submit_feedback') %></button><a href="#" class="skip-feedback mlL"><%- i18next.t('feedback.skip') %></a>
  1765. </p>
  1766. </div>
  1767. <% } %>
  1768. <% } %>
  1769. </div> <!-- .white-grid-block main-content -->
  1770.  
  1771. <% if (!test.logged_in) { %>
  1772. <div class="m mlA">
  1773. <p>Powered by</p>
  1774. <a href="https://www.hackerrank.com/?h_r=hrw&h_l=powered_by" target="_blank">
  1775. <img xmlns:xlink="http://www.w3.org/1999/xlink" width="150" style="opacity: 0.5; cursor: pointer;"
  1776. xlink:href="https://d3keuzeb2crhkn.cloudfront.net/hackerrank/assets/brand/wordmark_sm-511a7fac6dc12404ea1b8450a1d8711c.svg"
  1777. src="https://d3keuzeb2crhkn.cloudfront.net/hackerrank/assets/brand/wordmark_sm-edf9544f8d594a10a4f93610bf626461.png">
  1778. </a>
  1779. </div>
  1780. <% } %>
  1781. </div><!-- end .row -->
  1782. <div id="fb-root"></div>
  1783.  
  1784. </script>
  1785. <script type="text/template" id="recruit/question-coding-codeshellx">
  1786. <div class="banner mlB js-newcodeeditor csx-tour-banner hidden" aria-hidden="true">
  1787. <div class="js-closetour csx-closetour-button"><a class="btn btn-link">&#10006;</a></div>
  1788. <div class="row csx-tour-row">
  1789. <div class="span14 mmT" style="text-align:left">We recommend you take a quick tour of our editor before you proceed. The timer will pause up to 90 seconds for the tour. &nbsp; <a class="js-starttour btn btn-small btn-primary">Start tour</a></div>
  1790. </div>
  1791. </div>
  1792. <div id="input-output-help" aria-hidden="true"></div>
  1793. <div style="height:20px"></div>
  1794. <div id="csx-editor" style='width:100%;min-height:300px;'><span class="inline-throbber loading mdA"></span><br/>Loading the editor... If it does not appear shortly, please try refresh the page. If ithe issue persists, please contact support@hackerrank.com </div>
  1795. <% if(question.type == 'database'){ %>
  1796. <!-- add styles here for hiding codeshell stuff -->
  1797. <style>#show-preferences{display:none;}</style>
  1798. <%}%>
  1799. <div class="clearfix pmR pmL pmB plT fixed-hand1 codeshellx-footer">
  1800. <div class="pull-right">
  1801. <button class="btn bb-compile msR " data-analytics="Compile and Test">Run Code</button>
  1802. <button class="btn btn-primary bb-submit ans-submit" data-analytics="Submit Code">Submit code &amp; Continue</button>
  1803. </div>
  1804. <div class="pull-left inline">
  1805. <div class="mmT">
  1806. <label for="custom_checkbox"><input type="checkbox" id="custom_checkbox"><span class="lmT msL">Test against custom input</span></label>
  1807. <textarea rows="5" id="custominput" class="custom-input-box hidden" style="height:120px;width:225px"></textarea>
  1808. </div>
  1809. </div>
  1810. </div>
  1811. <div class="modal modal-huge" id="faq-modal">
  1812. <div class="modal-body"></div>
  1813. </div>
  1814. <div id="runstatus"></div>
  1815.  
  1816. </script>
  1817. <script type="text/template" id="recruit/question-base-split">
  1818. <textarea id="shouter" style="position: absolute !important; height: 25px; width: 25px;" aria-live="assertive" role="alert" aria-label="Notifications will appear here" tabindex="-1"></textarea>
  1819. <div class="fullscreen-wrapper" style="margin-top:<%= marginTop %>; " role="main">
  1820. <div class="left-sidebar">
  1821. <div class="title-name-wrapper">
  1822. <h4 class="qbookmark fullscreen-bookmark"><a class='js-bookmark' data-qid='<%-question.unique_id%>' style="cursor:pointer; position: relative; display: inline;" ><i class="icon-star-empty"></i></a></h4>
  1823. <h3 class="title qtitle fullscreen-qtitle"></h3>
  1824. <h6 class="bold pull-right qpoints"></h6>
  1825. </div>
  1826. <div class="js-left-content psT psB psR pjL">
  1827. </div>
  1828. </div> <!-- end .left-sidebar -->
  1829. <div class="separator"><span class="fullscreen-resize">||</span></div>
  1830. <div class="right-sidebar">
  1831. <div class="js-right-content"></div>
  1832. </div> <!-- end .right-sidebar -->
  1833. <div class="clearfix"></div>
  1834. </div> <!-- end .fullscreen-wrapper -->
  1835.  
  1836. </script>
  1837. <script type="text/template" id="recruit/question-completesentence">
  1838. <div class="span13">
  1839. </div>
  1840. <div class="clear"></div>
  1841.  
  1842. </script>
  1843. <script type="text/template" id="recruit/feedback-done">
  1844. <div>
  1845. <div class="text-center">
  1846. <div class="hr-branding">
  1847. <img class="mlA" src="<%= asset_path('brand/wordmark_sm.png') %>" height="50px"/>
  1848. </div>
  1849. <div style="padding: 30px 40px;width: 715px;text-align:left" class="white-grid-block main-content mdT text-center practice-at-hackerrank js-practice">
  1850. <% var message = "While you're waiting to hear back, practice by solving some code challenges on HackerRank"; %>
  1851. <% var bold_message = "Solving code challenges is one of the best ways to prepare for interviews."; %>
  1852. <% var button_text = "Solve Challenges"; %>
  1853. <p><%- message %></p>
  1854. <p class="bold"><%- bold_message %></p>
  1855. <div class="text-center mdT">
  1856. <a href="<%- attempt.get('hrc_synergy_url') %>" class="btn btn-primary practice-hackerrank">
  1857. <%- button_text %>
  1858. </a>
  1859. </div>
  1860. </div>
  1861. </div>
  1862. </div>
  1863.  
  1864. </script>
  1865. <script type="text/template" id="recruit/candidate-profile">
  1866. <div>
  1867. <div class="text-center">
  1868. <div class="hr-branding">
  1869. <img class="mlA" src="<%= asset_path('brand/wordmark_sm.png') %>" height="50px"/>
  1870. </div>
  1871. <p class="plB">Almost there! You are one step away from completing your job application.</p>
  1872. <div id='import-upload-profile-div' style="padding: 0 0 40px 0;width: 715px;text-align:left" class="white-grid-block main-content mdT text-center practice-at-hackerrank js-practice <% if (guess_linkedin_url) { %>hide<% } %>">
  1873. <ul class="wizard-steps clearfix">
  1874. <li class="">
  1875. <span class="head_text mlL"><span class="wizard-numb mlR">1</span>SIGN UP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="chevron"></span></span>
  1876. </li>
  1877. <li>
  1878. <span class="head_text mlL"><span class="wizard-numb mlR">2</span>COMPLETE TEST<span class="chevron"></span></span>
  1879. </li>
  1880. <li class="active">
  1881. <span class="head_text mlL"><span class="wizard-numb mlR">3</span>UPLOAD PROFILE</span>
  1882. </li>
  1883. </ul>
  1884. <hr style="margin-top:0">
  1885.  
  1886. <p>Upload your resume or simply import your Linkedin profile to complete the application.</p>
  1887. <div class="text-center mdA">
  1888. <% var resume_url = null; %>
  1889. <% if (HR.candidate.candidateAttemptModel.get("resume_url")) { %>
  1890. <% resume_url = HR.candidate.candidateAttemptModel.get("resume_url"); %>
  1891. Resume: <a href="<%= resume_url %>" target="_blank"><%= resume_url.split("/").slice(-1)[0] %></a>
  1892. <a class="btn btn-text cursor no-select msL" id="upload-resume-button"><i class="icon--single icon-upload"></i></a>
  1893. <% } else { %>
  1894. <a class="btn btn-primary cursor no-select" id="upload-resume-button"><i class="icon--single icon-upload"></i> Upload Resume</a>
  1895. <% } %>
  1896. <input class="hide" id="upload-resume-input" type="file">
  1897. <p class="no-select plL plR inline-block">or</p>
  1898. <% var linkedin_url = null; %>
  1899. <% if (HR.candidate.candidateAttemptModel.get("linkedin_url")) { %>
  1900. <% linkedin_url = HR.candidate.candidateAttemptModel.get("linkedin_url"); %>
  1901. Use Linkedin: <a href="<%= linkedin_url %>" target="_blank"><%= linkedin_url.split("//")[1] %></a>
  1902. <a class="btn btn-text cursor no-select msL" id="import-linkedin-button"><i class="icon--single icon-pencil"></i></a>
  1903. <% } else { %>
  1904. <a class="btn cursor no-select" id="import-linkedin-button"
  1905. style="border: 1px solid #0572aa;background: #1683bb;color: white;"><i class="icon--single icon-linkedin" style="margin-right: 5px;"></i> Import from LinkedIn</a>
  1906. <% } %>
  1907. </div>
  1908. <% if (resume_url != null || linkedin_url != null) { %>
  1909. <div class="m mlT">
  1910. <a class="btn btn-primary js-complete-application backbone mlT" href="<%= HR.candidate.candidateTestModel.get("unique_id") %>">Complete</a>
  1911. </div>
  1912. <% } %>
  1913. </div>
  1914.  
  1915. <div id='guess-linkedin-profile-div' style="padding: 30px 40px;width: 715px;text-align:left" class="white-grid-block main-content mdA text-center <% if (!guess_linkedin_url) { %>hide<% } %>">
  1916. <h4>Share LinkedIn profile</h4>
  1917. <p class='mlT'>We found a public LinkedIn profile connected to your account <i class="icon--single icon-help-circled js-tooltip cursor" data-placement="top" data-original-title="This is fetched using a service called pipl.com, which indexes public LinkedIn profiles. Rest assured, this will only be shared with <%= HR.candidate.candidateTestModel.get("company_name") %>."></i></p>
  1918. <p class='msT'><strong>PROFILE</strong>: <% if (guess_linkedin_url) { %><%= guess_linkedin_url %><% } %> &nbsp;&nbsp;<a href='<% if (guess_linkedin_url) { %><%= guess_linkedin_url %><% } %>' target='_blank' class='btn btn-text'><i class="icon--single icon-link-ext"></i></a></p>
  1919. <div class='m msT'>
  1920. <button class='btn btn-primary msR confirm-and-share'>Confirm & Share</button>
  1921. <button class='btn msL thats-not-me'>That's not me</button>
  1922. </div>
  1923. </div>
  1924.  
  1925. <img class="mlT mlB powered-by-image" src="<%= asset_path('brand/powered_by_transparent.png') %>" height="50px"/>
  1926. </div>
  1927. </div>
  1928.  
  1929. </script>
  1930. <script type="text/template" id="recruit/question-coding">
  1931. <div class="banner mlB js-codeeditor csx-tour-banner hidden">
  1932. <div class="js-closetour csx-closetour-button"><a class="btn btn-link">&#10006;</a></div>
  1933. <div class="row csx-tour-row">
  1934. <div class="span15 mmT" style="text-align:left"> <%- i18next.t('question.code.tour_recommendation') %> &nbsp; <a class="js-starttour btn btn-small btn-primary"><%- i18next.t('question.code.start_tour') %></a></div>
  1935. </div>
  1936. </div>
  1937. <div id="input-output-help"></div>
  1938. <style>.code-body .CodeMirror-scroll{overflow-y: auto !important;}</style>
  1939. <% if(question.type == 'database'){ %>
  1940. <!-- add styles here for hiding codeshell stuff -->
  1941. <style>#show-preferences{display:none;}</style>
  1942. <%}%>
  1943. <div id="editor" class="codeshell <% if (!fullscreen){%>mlT mlB<%}%>"><%- i18next.t('question.code.loading_code_editor') %>... <em style="color: #aaa;font-size: smaller;">(<%- i18next.t('question.code.refresh_if_noeditor') %>.)</em>.</div>
  1944. <small class="mlL leadingSpaceWarn hidden">
  1945. <em class="txt-atl-grey-dark warn-message"></em>
  1946. </small>
  1947. <% if (question.has_samples) {%>
  1948. <div id="dllink clearfix" class="mdB mjT" style="clear:both"><a id="testcase-dl" aria-label="Download Test Cases" href="javascript:void(0);"><i class="icon--single icon-download"> <%- i18next.t('question.code.download_sample_testcases') %></i></a><small class="mlL"><em class="txt-alt-grey-dark"><%- i18next.t('question.code.unix_line_endings') %> </em></small></div>
  1949. <% } %>
  1950.  
  1951. <div id="runstatus" class="clear"></div>
  1952.  
  1953. </script>
  1954. <script type="text/template" id="recruit/topbar">
  1955. <header aria-label="Information about test in this banner" class="nav-make-fixed min-1024 page-header <% if (test.get('logo')) { %> hr_haslogo <% } %>" id="page-header">
  1956. <div class="row-fluid">
  1957. <% if (test.get('logo')) { %>
  1958. <span class="span6 nav-logo">
  1959. <a class="HackerRankLogo backbone company-logo-candidate-site" aria-hidden="true">
  1960. <img src="<%= test.get('logo') %>" alt="Hackerrank Logo" aria-hidden="true"/>
  1961. </a>
  1962. <span style="padding-left:50px;" class="text-ellipsis txt-white customer-font-color mlA" aria-level="2" aria-atomic="true" aria-label="<%- test.get('name') %>" title="<%- test.get('name') %>">
  1963. <% if (test.get("multi_login") && test.get("multi_login").length > 0) {%>
  1964. <a class="js-othertest mlR pull-left" href="" title="View other logged in tests"><small aria-level="2">(Other)</small> <i class="icon--single icon-popup" aria-hidden="true"></i></a>
  1965. <%}%>
  1966. <%- test.get('name') %>
  1967. </span>
  1968. </span>
  1969. <% } else { %>
  1970. <div class="span6">
  1971. <span class="nav-logo"><a class="HackerRankLogo backbone logo-candidate-site">
  1972. <img src="<%= asset_path('brand/h_mark_sm.png') %>" aria-hidden="true"/></a>
  1973. </span>
  1974. <span style="padding-left:50px;" class="text-ellipsis txt-white customer-font-color mlA" aria-atomic="true" aria-level="2" aria-label="<%- test.get('name') %>" title="<%- test.get('name') %>">
  1975. <% if (test.get("multi_login") && test.get("multi_login").length > 0) {%>
  1976. <a class="js-othertest mlR pull-left" aria-level="2" aria-label="Also Online:" href="" title="View other logged in tests"><small>(Other)</small> <i class="icon--single icon-popup" aria-hidden="true"></i></a>
  1977. <%}%>
  1978. <%- test.get('name') %>
  1979. </span>
  1980. </div> <!-- .span7 -->
  1981. <% } %>
  1982.  
  1983. <div class="span2 text-center" aria-level="2" aria-label="Time Left in Test:" >
  1984. <div class="pmT pmB mmT mmB timerspan <% if (showalert) {%>alerttimer<%}%>" aria-atomic="true" ><i aria-hidden="true" class="icon-clock txt-alt-grey"></i>&nbsp;<span aria-atomic="true" class="txt-white customer-font-color" id="countdown-timer"></span><br><span aria-hidden="true" class="timer-tag customer-font-color" id="timertag"></span></div>
  1985. </div> <!-- .span3 -->
  1986. <div class="span1" aria-hidden="true">&nbsp;</div>
  1987.  
  1988. <div class="span4">
  1989. <div class="mlT txt-white customer-font-color span16">
  1990. <div class="dark-theme-progress small span8 pmT" aria-hidden="true">
  1991. <div class="base">
  1992. <div class="cover progress-done"></div>
  1993. </div>
  1994. </div>
  1995. &nbsp;<span class="js-progress span8 pdL" aria-level="2" aria-label="Questions Attempted:"><span class="qdone"></span>/<span class="qcount"></span> <%= i18next.t('questions_list.attempted') %></span>
  1996. <span class="js-loader hidden span8 pdL"> <img src="<%= asset_path('hackerrank_spinner_64x64.gif') %>" height="24" width="24"/></span>
  1997. </div>
  1998. </div> <!-- .span4 -->
  1999.  
  2000. <div class="span3" aria-hidden="true">
  2001. <span class="text-ellipsis txt-white customer-font-color mlT"><i class="icon-user txt-alt-grey fnt-sz-mid"></i>&nbsp;<%- attempt.get('full_name') || attempt.get('email') %></span>
  2002. </div> <!-- .span2 -->
  2003.  
  2004. </div> <!-- .row-fluid -->
  2005. </header>
  2006.  
  2007.  
  2008. </script>
  2009. <script type="text/template" id="recruit/question-subjective">
  2010. <h5 class="mdB">ANSWER</h5>
  2011. <div id="editorsub"></div>
  2012.  
  2013. </script>
  2014. <script type="text/template" id="recruit/candidate-details">
  2015. <!--TODO: Test -->
  2016.  
  2017. <% if (test.facebook_login) { %>
  2018. <div class="js-loginform text-center" >
  2019. <button class="btn mdB btn-primary btn-large btn-blue fblogin"><i class="mdR icon--single icon-facebook"></i>Login using facebook..</button>
  2020. <div class="clear"></div>
  2021. <em><small class="grey">We'll build a profile using your facebook account.<br>You may then start the test.</small></em>
  2022. </div>
  2023. <% } else { %>
  2024.  
  2025. <% if(hrCandidateLogin && !isHRSC) { %>
  2026. <div class="login-with-hr-dropdown dropdown mlB">
  2027. <a class="dropdown-toggle btn btn-line" data-toggle="dropdown"><%= hacker.email %> <i class="icon-down-open icon--right"></i></a>
  2028. <ul class="dropdown-menu">
  2029. <li><a href="#" class="change-hacker-profile">Switch account</a></li>
  2030. </ul>
  2031. </div>
  2032.  
  2033.  
  2034. <div class="clearfix"></div>
  2035. <% } %>
  2036. <% var _class = "";
  2037. if( HR && HR.params && HR.params.hide == true ) { _class="hide" } %>
  2038. <div class="clear_form">
  2039. <form id="test-login-form" class="no-margin js-loginform" aria-level="1">
  2040. <h5 class="text-center msB candidate-details-header" aria-level="2"></h5>
  2041.  
  2042. <!-- The following section will be auto populated when there is any error in the login page -->
  2043. <div class="alert mlB hide psT text-center error error-message" id="error-message" role="status">
  2044. <header></header>
  2045. <p></p>
  2046. </div>
  2047.  
  2048.  
  2049. <div class="form_outer_cover with_width">
  2050. <div class="clear_formgroup">
  2051. <div class="formgroup psT <%= _class %>">
  2052. <label class="support-long-text candidate-login-id-label required-param" for="email-address" aria-level="2"><%= i18next.t('login_field.email_address_login') %></label>
  2053. <div class="block">
  2054. <input type="text" class="with-help wide" id="email-address" aria-label="Enter your email address in this textbox" name="email" value="<%- (HR && HR.params && HR.params.email) ? HR.params.email : ((HR && HR.params && HR.params.username) ? HR.params.username : "") %>">
  2055. </div>
  2056. </div>
  2057. </div>
  2058.  
  2059. <div class="clear"></div>
  2060.  
  2061. <% if (!test.auth_valid) { %>
  2062.  
  2063. <div class="clear_formgroup">
  2064. <div class="formgroup <%= _class %>" role="form">
  2065. <label class="support-long-text" for="password"><%= i18next.t('login_field.password') %></label>
  2066. <div class="block">
  2067. <input type="password" id="password" aria-level="2" class="with-help wide" aria-label="Enter your password in this textbox" name="password" value="<%- (HR && HR.params && HR.params.password)? HR.params.password : "" %>">
  2068. </div>
  2069. </div>
  2070.  
  2071. </div>
  2072. <% } %>
  2073.  
  2074. <div class="clear"></div>
  2075. <% if(isHRSC) {%>
  2076. <div class="clear_formgroup">
  2077. <div class="formgroup" role="form">
  2078. <label class="support-long-text"><%= i18next.t('login_field.full_name') %></label>
  2079. <div class="block">
  2080. <input type="text" aria-level="2" aria-label="Enter your full name in this textbox" class="with-help wide auto-fill" name="full_name">
  2081. </div>
  2082. </div>
  2083. </div>
  2084. <% } else {%>
  2085.  
  2086. <% _.each(test.collect_info, function(item) { %>
  2087. <div class="clear_formgroup">
  2088. <div class="formgroup" role="form">
  2089. <label class="support-long-text<% if(item['required']) { %> required-param<% } %>"><%- item.title || item.field_name %></label>
  2090. <% if(typeof(item["type"]) !== "undefined") { %>
  2091. <% if(item['type'] === 'input') { %>
  2092. <input type="text" aria-label="Enter your <%- item.title %> in this text box" id="role_text" aria-level="2" class="with-help wide" name="<%- item.field_name %>" />
  2093. <% } else if(item['type'] === 'select') { %>
  2094. <select name="<%- item.field_name %>" class="with-help wide" aria-level="1" aria-label="Select <%- item.field_name %>" role="listbox">
  2095. <option value="" selected="selected" role="option"><%- item['options_placeholder'] || 'Select' %></option>
  2096. <% _.each(item['options'], function(opt) { %>
  2097. <option value="<%- opt %>" role="option"><%- opt %></option>
  2098. <% }) %>
  2099. </select>
  2100. <% } else if(item['type'] === 'radio') { %>
  2101. <% for(var i = 0; i < item.options.length; i += item.colPerRow) {
  2102. var currentSlice = _.compact(item['options'].slice(i, i + item.colPerRow));
  2103. %>
  2104. <div class="row">
  2105. <% _.each(currentSlice, function(option) { %>
  2106. <div class="span-md-<%- Math.floor(16 / item.colPerRow ) %> zero-left-padding">
  2107. <input role="radio" class="hr-sleek-input" type="radio" id="<%- item.field_name %>-<%- option.split(' ').join('-') %>" name="<%- item.field_name %>" value="<%- option %>" aria-label="<%- option %>" />
  2108. <label class="widget fnt-wt-500" for="<%- item.field_name %>-<%- option.split(' ').join('-') %>" aria-hidden="true"><span></span> <%- option %></label>
  2109. </div>
  2110. <% }) %>
  2111. </div>
  2112. <% } %>
  2113. <% } else if(item['type'] === 'checkbox') { %>
  2114. <% for(var i = 0; i < item.options.length; i += item.colPerRow) {
  2115. var currentSlice = _.compact(item['options'].slice(i, i + item.colPerRow));
  2116. %>
  2117. <div class="row">
  2118. <% _.each(currentSlice, function(option) { %>
  2119. <div class="span-md-<%- Math.floor(16 / item.colPerRow ) %> zero-left-padding">
  2120. <input role="checkbox" class="hr-sleek-input" type="checkbox" id="<%- item.field_name %>-<%- option.split(' ').join('-') %>" name="<%- item.field_name %>" value="<%- option %>" aria-label="<%- option %>" />
  2121. <label class="widget fnt-wt-500" for="<%- item.field_name %>-<%- option.split(' ').join('-') %>" aria-hidden="true"><span></span> <%- option %></label>
  2122. </div>
  2123. <% }) %>
  2124. </div>
  2125. <% } %>
  2126. <% } else if(item['type'] === 'file') { %>
  2127. <% if(item.field_name === 'resume') { %>
  2128. <% if(hacker && hacker.resume_url) { %>
  2129. <div class="fnt-sz-small msT mdB">
  2130. <a href="<%= hacker.resume_url %>" id="hr-resume-link" class="resume-link fnt-wt-500" target="_blank"><%= "..."+hacker.resume_url.split('/').pop() %></a>&nbsp;&nbsp;<a href="#" style="color: #f65039" class="remove-resume delete" aria-label="Upload your resume">Remove</a>
  2131. <input type="hidden" name="resume" value="<%= hacker.resume_url %>">
  2132. </div>
  2133. <% } else { %>
  2134. <input type="file" aria-label="Upload your resume" class="with-help wide" name="<%- item.field_name %>">
  2135. <% } %>
  2136. <% } else { %>
  2137. <input type="file" aria-label="Upload your <%- item.title %>" class="with-help wide" name="<%- item.field_name %>">
  2138. <% } %>
  2139. <% } else if(item['type'] === 'select2') { %>
  2140. <div id="js-<%- item.field_name %>" name="<%- item.field_name %>" style="width: <% if(item['select2_width']) { %><%- item['select2_width'] %>% <% } else { %>20%<% } %>; margin-right: 5px !important;" class="msB"></div> <% if(item.field_name === 'work_experience') { %><span class="mjR msL">years</span></span><% } %>
  2141. <input type="text" aria-label="Enter your <%- item.title %> in this text box" id="role_text" aria-level="2" class="with-help wide hidden js-other-<%- item.field_name %>" name="not-compulsory-other-hrw-<%- item.field_name %>" style="margin-top: 10px;" placeholder="Enter <%- item.title %>">
  2142. <% } %>
  2143. <% } else { %>
  2144. <input type="text" aria-label="Enter your <%- item.title %> in this text box" id="role_text" aria-level="2" class="with-help wide" name="<%- item.field_name %>" />
  2145. <% } %>
  2146. <div class="clear"></div>
  2147. </div>
  2148. </div>
  2149. <% }); %>
  2150.  
  2151. <% } %>
  2152. <% if (show_phone_verification) { %>
  2153. <% if (!has_unverified_phone_number || showEditInterface) { %>
  2154. <div class="formgroup" role="form" style="position: relative;">
  2155. <label class="support-long-text">Mobile</label>
  2156. <input id="country-code" type="text" class="span2"
  2157. <% if (showEditInterface) { %>
  2158. value="<%= hacker.phone.unverified_country_code %>"
  2159. <% } else { %>
  2160. value="<%= test.country_calling_code %>"
  2161. <% } %>>
  2162. <input id="phone-number" type="text" class="msL" style="margin-left: 10px; width: 17.9em;" placeholder="Mobile number" <% if (showEditInterface) { %>value="<%= hacker.phone.unverified_number %>"<% } %>>
  2163. <i class="icon--single icon-help-circled cursor phone-number-help js-tooltip fnt-sz-small" data-placement="top" style="margin-left: -28px;"
  2164. data-original-title="You need a verified mobile number to apply. Rest assured, this will only be shared with <%= test.company_name %>."></i>
  2165. <button class="btn btn-primary msL verify-mobile" style="width: 9em;">Verify</button>
  2166. <span class="inline-throbber verify-mobile loading" style="position: absolute; right: -2.2em; top: 2.2em; display: none;">
  2167. </span>
  2168. <div class="clear"></div>
  2169. </div>
  2170. <div class="formgroup" role="form">
  2171. <p class='phone-number-success-message-wrap hide'><i class="icon--single icon2-status_correct green"></i>
  2172. <span class='phone-number-success-message'></span></p>
  2173. </div>
  2174. <% } else { %>
  2175. <div class="formgroup" role="form">
  2176. <p class='phone-number-success-message-wrap'><i class="icon--single icon2-status_correct green"></i>
  2177. <span class='phone-number-success-message'>A 4-digit code has been sent to <%= hacker.phone.unverified_country_code %>-<%= hacker.phone.unverified_number %></span> <a class="cursor edit-phone-number"><i class="icon--single icon-pencil"></i></a></p>
  2178. </div>
  2179. <% } %>
  2180.  
  2181. <div class="formgroup verification-code-section" role="form">
  2182. <label class="support-long-text">Code</label>
  2183. <input type="text" id="phone-verification-code" class="span3" autocomplete="off">
  2184. <% if (!(!has_unverified_phone_number || showEditInterface)) { %>
  2185. <div class="msT">
  2186. <a class="cursor mlL" id="resend-code">Resend code</a>
  2187. </div>
  2188. <% } %>
  2189. </div>
  2190. <div class="clearfix"></div>
  2191. <% } %>
  2192. <% if(hrCandidateLogin) { %>
  2193. <div class="linkedin-container pdB">
  2194.  
  2195. </div>
  2196. <% } %>
  2197. <div class="bottom-checkbox-fields">
  2198. <% if(_.contains([null, false], shareProfile) && hrCandidateLogin && !isHRSC) {%>
  2199. <div id="login-form-share-profile" role="form">
  2200. <div>
  2201. <input type="checkbox" tabindex="-1" role="checkbox" name="share-profile" title="Check or uncheck this checkbox to share your hackerrank profile" id="share-profile" class="hr-sleek-input" style="margin-top:10px;" <% if(shareProfile) { %>checked='checked'<% }%>/>
  2202. <label class="acknowledge-text fnt-wt-500" for="share-profile">
  2203. <span tabindex="0" data-for="share-profile" aria-label="Press space to agree or disagree to share your hackerrank profile"></span>Share my <a href="/<%= hacker.username %>" target="_blank">HackerRank profile</a> with <%= test.company_name %> <i class="icon-help-circled js-tooltip icon-adjust pointer-cursor fnt-sz-small" data-title="Company can see badges you've unlocked and other details in your profile"></i>
  2204. </label>
  2205. </div>
  2206. </div>
  2207. <% } %>
  2208.  
  2209.  
  2210. <!-- TODO: Set alert if submit button is pressed and alert is not presented -->
  2211. <% if (!test.enable_acknowledgement || test.enable_acknowledgement === 'True') { %>
  2212. <div id="login-form" role="form" class="mdT">
  2213. <input type="checkbox" role="checkbox" name="acknowledge" title="Check or uncheck this checkbox to agree to terms and conditions" id="acknowledge" class="hr-sleek-input" tabindex = -1/>
  2214. <label class="acknowledge-text fnt-wt-500" for="acknowledge">
  2215. <span tabindex="0" data-for="acknowledge" aria-label="Press space to agree or disagree to terms and conditions"></span>
  2216. <% if (test.custom_acknowledge_text) { %>
  2217. <%- test.custom_acknowledge_text %>
  2218. <% } else { %>
  2219. I will not consult/copy code from any source including a website, book, or friend/colleague to complete these tests, though may reference language documentation or use an IDE that has code completion features.
  2220. <% } %>
  2221. </label>
  2222. </div>
  2223. <% } %>
  2224. </div>
  2225.  
  2226. <div class="clear"></div>
  2227.  
  2228. <div class="formgroup no-margin text-center start-test-button-container">
  2229. <br/>
  2230. <div aria-level="1">
  2231. <button class="btn mdB btn-primary btn-large test-submit" <% if (show_phone_verification && !has_unverified_phone_number) { %>disabled="disabled"<% } %> role="button"><%= i18next.t('login.start_challenge') %></button>
  2232. </div>
  2233. </div>
  2234. </div>
  2235. </form>
  2236. </div>
  2237. <% } %>
  2238.  
  2239. </script>
  2240. <script type="text/template" id="recruit/candidatemismatch">
  2241. <div>
  2242. <center>
  2243. <h2 class="headline">Login alert!</h2>
  2244. </center>
  2245. <div class="white-grid-block main-content">
  2246. <h3 class="mlB">Logged into another test</h3>
  2247. <p>It looks like you're still not finished taking the test <code><%- test.name %></code> and you're now trying to login to: <code><%- test.other.name %></code></p>
  2248. <h4 class="mlT">What would you like to do?</h4>
  2249. <center>
  2250. <a class="btn mlA backbone" href="<%- test.unique_id %>/questions">Continue with '<%- test.name %>'</a><br>
  2251. <a class="btn margin-10 js-gotoother" href="<%- test.other.unique_id %>/<%- test.other.auth_key %><%- otherUrlParams %>">Logout and go to '<%- test.other.name %>'</a>
  2252. </center>
  2253. </div>
  2254.  
  2255. <center>
  2256. <div class="block">
  2257. <img class="mlT" src="<%= asset_path('brand/powered_by_transparent.png') %>" />
  2258. <% if (test.logged_in && test.attempt_done) { %>
  2259. <p class="text-center txt-alt-grey">
  2260. Love Programming challenges? </br>
  2261. Find more problems and contests at <strong><a href="https://www.hackerrank.com/" class="txt-alt-grey">www.hackerrank.com</a></strong>
  2262. </p>
  2263.  
  2264. <% } %>
  2265. </div>
  2266. </center>
  2267.  
  2268. </div><!-- end .row -->
  2269.  
  2270. </script>
  2271. <script type="text/template" id="recruit/question-diagram">
  2272. <p class="font20 f-weight-600">ANSWER</p>
  2273. <p>You can drag and drop the widgets to construct your diagram. If you'd like to include any explanatory comments on your work you can do so in the editor below the drawing widget.</p>
  2274. <br />
  2275. <div id= "geEditor" class="geEditor" ></div>
  2276. <input name="draw_xml" id="draw_xml" type="hidden" ></input>
  2277. <input name="draw_svg" id="draw_svg" type="hidden" ></input>
  2278. <br />
  2279. <p class="font20 f-weight-600">Explanation</p>
  2280. <em class="fnt-sz-small grey" style="font-weight: 500;">Your answer will be periodically saved as a draft.</em>
  2281. <div id="editordiag"></div>
  2282.  
  2283. </script>
  2284. <script type="text/template" id="recruit/instructions">
  2285. <div class="container" style="margin-top:63px;">
  2286.  
  2287. <div class="test-instruction-wrapper">
  2288. <span class="challengeslist_challenge-title green-title customer-title-font-color">INSTRUCTIONS</span>
  2289. <%= instructions %>
  2290. </div>
  2291.  
  2292. </div>
  2293.  
  2294. </script>
  2295. <script type="text/template" id="recruit/fullstack-project">
  2296. <div class="alert alert-info fullstack-instructions">
  2297. <strong>Instructions</strong>
  2298. <ul class="mlL mlR msT mlB">
  2299. <li class="list">Complete the project in the editor by writing the necessary code to satisfy the given requirements and pass all tests.</li>
  2300. <li class="list">Install build dependencies by clicking <em>Project &gt; Install</em>.</li>
  2301. <li class="list">Run code by clicking <em>Project &gt; Run</em>.</li>
  2302. <li class="list">Run tests by clicking <em>Project &gt; Test</em>.</li>
  2303. <li class="list">If the project exposes a web service, view the application website by clicking <em>Project &gt; Visit App</em>.</li>
  2304. </ul>
  2305. </div>
  2306.  
  2307. <div id="ck-container" class="candidate">
  2308. <div id="ck" class="codekit-editor"></div>
  2309. </div>
  2310.  
  2311. </script>
  2312. <script type="text/template" id="recruit/sudorankinfo">
  2313. <div class="alert mjA">
  2314. <header>Server details<a class="close pull-right"></a></header>
  2315. <p>To complete the <code><%=window.istreet.cfg.hrqn.sudorank%></code> questions, you'll need to login to the server per details below:</p>
  2316. <p class="serverdetails mlT"><img src="https://hrcdn.net/hackerrank/assets/ajax-msg-loader-4d8e554413e48d07592e67c5d804a2c1.gif" /> Loading server details (can take a moment). Any lost time will be added back into the test.</p>
  2317. <p class="js-admin hidden"><strong>Note: </strong> The setup and check scripts have been made available for your use in the /tmp folder.</p>
  2318. <div class="clear" />
  2319. </div>
  2320. </script>
  2321. <script type="text/template" id="recruit/question-servertask">
  2322. <div class="span-xs-16 span-md-4 task-sidebar pdA js-sidebar-holder">
  2323. <%if(question.solve == null){%>
  2324. <p>This is a server type task, and you will complete a set of tasks on a live Linux server.</p>
  2325. <p class="pdT">All activity will be monitored. Access to the server is being provided <em>only</em> to complete tasks, and nothing else. Remember: with power comes responsibility.</p>
  2326. <p class="pdT">Launch server when ready.</p>
  2327. <div class="clear"/>
  2328. <a class="btn btn-primary mdT js-startserver">Start server</a>
  2329. <%} else if (!user_accessible) {if (!finished) {%>
  2330. <p class="pdT">STATUS: <img src="//hrcdn.net/hackerrank/assets/ajax-msg-loader-4d8e554413e48d07592e67c5d804a2c1.gif"/> <%=server_state%></p>
  2331. <p class="pdT"><strong>Accessing server</strong><br/><small>(can take a moment)</small></p>
  2332. <div class="clear"/>
  2333. <a class="btn mdT js-refreshserver">Refresh</a>
  2334. <p class="pdT"><small>(Will auto refresh when ready)</small></p>
  2335. <%} else { %>
  2336. <p class="pdT pdB"><strong>Task time completed.</strong><br/></p>
  2337. <p>Server is no longer accessible</p>
  2338. <a class="btn mdT backbone" href="<%- HR.candidate.candidateTestModel.get('unique_id') %>/questions">Click here to close the test</a>
  2339. <%}%>
  2340. <% } else if(user_accessible){%>
  2341. <div class="pdT pdB"><strong>Server access</strong> (choose one)</div>
  2342. <div class="btn-group">
  2343. <% if(task_attempt.username == "ubuntu") { %>
  2344. <a class="btn js-webshell <%- use_web? 'active': '' %>">Webshell</a>
  2345. <% } %>
  2346. <a class="btn js-terminal <%- !use_web? 'active': '' %>">Terminal login</a>
  2347. </div>
  2348. <div "js-timeleft"></div>
  2349. <div class="pdT"><strong>Task description</strong></div>
  2350. <div class="pdT"><%=question.question%></div>
  2351. <%if(task_attempt.task_descriptions){%>
  2352. <div class="pdT"><p>You may attempt the tasks in any order.<p></div>
  2353. <div class="pdT pdB"><strong>Tasks (<%- task_attempt.task_descriptions.length %>)</strong></div>
  2354. <%}%>
  2355. <ul>
  2356. <% task_attempt.task_descriptions && _.each(task_attempt.task_descriptions, function(t){%>
  2357. <li class="mdL"><%=t%></li>
  2358. <%})%>
  2359. </ul>
  2360. <a class="btn mdT backbone" href="<%- HR.candidate.candidateTestModel.get('unique_id') %>/questions">Click here when done</a>
  2361. <%}%>
  2362. </div>
  2363. <div class="span-xs-16 span-md-12 js-content-holder">
  2364. <%if (user_accessible) {%>
  2365. <% if (use_web) { url = task_attempt.proxy_url || "//" + task_attempt.ip_address+":81" %>
  2366. <div class="span-xs-16 span-md-8">
  2367. <strong>Username:</strong> <%- task_attempt.username %>, <strong>Password:</strong> <%- task_attempt.password %>
  2368. <br/><a class="btn-link js-webshell-help"><i class="icon-keyboard"></i> Webshell help</a>
  2369. </div>
  2370. <div class="span-xs-16 span-md-8">
  2371. If the webshell interface seems slow, <a target="_blank" href="http://<%=task_attempt.ip_address%>:81/?u=<%- task_attempt.username %>&p=<%- task_attempt.password %>" class="js-opennewtab">open in new tab</a>, or use terminal login.
  2372. </div>
  2373. <iframe src="<%=url%>?u=<%- task_attempt.username %>&p=<%- task_attempt.password %>" width="100%" height="600px"></iframe>
  2374. <%}else {%>
  2375. <div class="mdA">
  2376. <h4>Login details</h4>
  2377. <p class="pdT pdB">In your terminal or ssh app, use the following details to login</p>
  2378. <p><strong>IP address:</strong> <%- task_attempt.ip_address %></p>
  2379. <p><strong>User:</strong> <%- task_attempt.username %></p>
  2380. <p><strong>Password:</strong> <%- task_attempt.password %></p>
  2381. </div>
  2382. <%}%>
  2383. <%}%>
  2384. </div>
  2385. </script>
  2386. <script type="text/template" id="recruit/question-list">
  2387. <div class="container" style="margin-top:70px;">
  2388. <div class="row js-server">
  2389.  
  2390. </div>
  2391. <table class="candidate-sleek-table candidate-question-list fadeinContent" width="100%" cell-spacing="0" cell-padding="0" aria-level="1">
  2392. <thead>
  2393. <tr role="rowheader">
  2394. <td width="3%"></td>
  2395. <td width="5%"></td>
  2396. <% if (show_question_points) { %>
  2397. <td width="40%" class="upper-case grey"><%= i18next.t('questions_list.question_name') %></td>
  2398. <td width="6%" class="upper-case grey">POINTS</td>
  2399. <% } else { %>
  2400. <td width="46%" class="upper-case grey"><%= i18next.t('questions_list.question_name') %></td>
  2401. <% } %>
  2402. <td width="17%" class="upper-case grey"><%= i18next.t('questions_list.type') %></td>
  2403. <td width="11%" class="upper-case grey"><%= i18next.t('questions_list.status') %></td>
  2404. <td width="18%"></td>
  2405. </tr>
  2406. </thead>
  2407. </table>
  2408. <% for(i=1; i<=section_count; i++) { %>
  2409. <table aria-level="1" aria-live="polite" role="grid" class="candidate-sleek-table candidate-question-list fadeinContent section<%- i %> " width="100%" cell-spacing="0" cell-padding="0" >
  2410. </table>
  2411. <center class="section-separator">
  2412. <button aria-label="Go to next section by pressing this button" aria-level="1" class="btn section-finish-<%- i %> next-section hidden" data-section="<%- i %>"><i class="icon--single icon-down-arrow pmR"></i><%= i18next.t('questions_list.close_and_go_to_section') %> <%- i+1 %></button>
  2413. </center>
  2414. <% } %>
  2415. <div style="margin-top:60px"></div><!-- Don't remove this empty div. -->
  2416. <div class="sticktobottom text-center" style="width:100%;background:white;margin-top:60px; margin-bottom:60px;" >
  2417. <button aria-level="1" aria-label="Press this button when you are done with the test" class="btn mlA test-done" <%if(!enable_testdone){%>disabled<%}%>><i class="icon--single icon-ok pdR"></i><%= i18next.t('questions_list.im_done_with_test') %></button>
  2418. </div>
  2419. </div>
  2420.  
  2421.  
  2422.  
  2423.  
  2424. </script>
  2425. <script type="text/template" id="recruit/sidebar">
  2426. <div id="side-navigation">
  2427. <nav class="page_navigation-sidebar expand hr_slide-away-element ligter-sidebar hr-candidate-rules" id="sidebar" style="top: 70px;">
  2428. <div class="mini-dash" style="display:none">
  2429. <!--<footer class="clearfix">
  2430. <p class="pull-left rank"><i class="icon-up-dir-1 success"></i> 5572<span class="sub-label">Points</span></p>
  2431. <p class="pull-right rank"><i class="icon-up-dir-1 success"></i> 242<span class="sub-label">Rank</span></p>
  2432. -->
  2433. </div>
  2434. <div class=" sidebar_nav-list fixed-nav questions-indicator" aria-level="1" role="menubar">
  2435. </div>
  2436.  
  2437. <div class="sidebar-scroll-list-container" aria-label="Questions">
  2438. <div class="unstyled sidebar_nav-list psT questions-indicator questions-nav" role="menu" aria-level="2">
  2439. </div>
  2440. </div>
  2441. </nav>
  2442. </div>
  2443.  
  2444. </script>
  2445. <script type="text/template" id="recruit/candidatemessage">
  2446. <div>
  2447. <center>
  2448. <h2 class="headline"><%- (test.name || "Unknown test") %></h2>
  2449. </center>
  2450. <div class="white-grid-block main-content">
  2451. <h3 class="msB">MESSAGE</h3>
  2452. <div class="alert info mlB" aria-live="assertive">
  2453. <p role="alert"><%=message%></p>
  2454. </div>
  2455. <br>
  2456. <%if (test.unique_id) { %>
  2457. <a href="<%- test.unique_id %>"><%- i18next.t('back_to_main_page') %>Back to main page.</a>
  2458. <% } %>
  2459. </div>
  2460.  
  2461. <center>
  2462. <div class="block">
  2463. <img class="mlT" src="<%= asset_path('brand/powered_by_transparent.png') %>" />
  2464. <% if (test.logged_in && test.attempt_done) { %>
  2465. <p class="text-center txt-alt-grey">
  2466. Love Programming challenges? </br>
  2467. Find more problems and contests at <strong><a href="https://www.hackerrank.com/" class="txt-alt-grey">www.hackerrank.com</a></strong>
  2468. </p>
  2469.  
  2470. <% } %>
  2471. </div>
  2472. </center>
  2473.  
  2474. </div><!-- end .row -->
  2475.  
  2476. </script>
  2477. <script type="text/template" id="recruit/question-design-codeshellx">
  2478. <div id="csx-editor" class="mlT mlB"></div>
  2479.  
  2480. <div class="output-area-wrap hidden">
  2481. <div class="output-area padded light-wrap" id="output-area">
  2482. <p class="status">Status: <span class="status-msg">Uploading..</span></p>
  2483. </div>
  2484. </div>
  2485.  
  2486. <div class="span16 hidden center-block light-wrap" style="height:600px;" id="runstatus-load">
  2487. <div class='gray'> <div style='background: url(<%= asset_path('hackerrank_spinner_64x64.gif') %>); height: 64px; width: 64px; display: inline-block;'></div> </div>
  2488. </div>
  2489. <iframe class="span16 no-padding hidden light-wrap" sandbox="allow-forms allow-popups allow-scripts allow-same-origin" height="600px" name="runstatus" id="runstatus" src="">
  2490. </iframe>
  2491.  
  2492. </script>
  2493. <script type="text/template" id="recruit/question-project">
  2494. <div id="editor" class="codeshell mlT mlB"></div>
  2495. <div class="clear"></div>
  2496. <% if(question.type == "android" && question.project_type == "gradle") { %>
  2497. <div id="candidate-notes" class="output-progress padded light-wrap mlT mlB psT" style = "">
  2498. <strong>Instructions:</strong>
  2499. <ul class="lg-small lg-ordered lg-tight">
  2500. <li class="lg-item">Download the source code by clicking on 'Download code as Zip' link available below the code editor</li>
  2501. <li class="lg-item">Uncompress the zip file</li>
  2502. <li class="lg-item">Import the project folder named Solution in Android Studio</li>
  2503. <li class="lg-item">Complete the implementation and verify the app on an emulator or on a physical device</li>
  2504. </ul>
  2505. <br>
  2506.  
  2507. <strong>Upon completion follow these steps to upload the Solution:</strong>
  2508. <ul class="lg-small lg-ordered lg-tight">
  2509. <li class="lg-item">Cleanup the project build artifacts by clicking on Build -> Clean Project in Android Studio</li>
  2510. <li class="lg-item">Compress the Solution folder into a zip file</li>
  2511. <li class="lg-item">Upload the zip file by clicking on 'Upload code as Zip' link available below the code editor</li>
  2512. NOTE: Any modifications that you may have done to the build settings files (i.e. app/build.grade, etc) will be reverted back to the original settings upon upload. This step is to ensure the build settings match the platform
  2513.  
  2514. <li class="lg-item">Verify that the project is building successfully by clicking on 'Build' button. Build process might take upto a couple of minutes</li>
  2515. <li class="lg-item">Upon successful build, submit and continue</li>
  2516. </ul>
  2517. <br>
  2518.  
  2519. <strong>How is my submission evaluated?</strong>
  2520. <p class="psT mlL">The app will be evaluated against a set of automated Espresso tests. In order to get a full score make sure you have implemented every action item in the question description</p>
  2521. </div>
  2522. <% } %>
  2523. <div id="runstatus"></div>
  2524. </iframe>
  2525.  
  2526. </script>
  2527. <script type="text/template" id="recruit/hackerrank-login">
  2528. <div class="login-group less_wide clearfix login-with-hr-form" id="login-with-hr-form">
  2529. <div class="homepage_signup clear_form signup <% if(action == 'login') { %>hidden<% } %>" id="hr-signup">
  2530. <h5 class="text-center mlB">Create a HackerRank account to take <%- test.company_name %>'s code challenge</h5>
  2531. <div class="homepage_admin">
  2532. <div class="form_outer_cover">
  2533. <form id="legacy-signup" class="legacy-form" method="POST" autocomplete="off">
  2534. <div class="homepage_signupgroup--legacy">
  2535. <div class="text-center alert error psT hidden mlB"></div>
  2536.  
  2537. <div class="formgroup">
  2538. <input id="full_name" type="text" name="full_name" value="" placeholder="Full name" data-content="" data-toggle="tooltip" data-placement="right" autocomplete="off"/>
  2539. <input type="text" name="not-an-full_name" value="" style="display: none" />
  2540. </div>
  2541.  
  2542. <div class="formgroup">
  2543. <input id="email" type="text" name="email" value="" placeholder="Email" data-content="" data-toggle="tooltip" data-placement="right" autocomplete="off"/>
  2544. <input type="text" name="not-an-email" value="" style="display: none" />
  2545. </div>
  2546.  
  2547. <div class="formgroup">
  2548. <input id="password" type="password" name="password" placeholder="Password" data-content="" data-toggle="tooltip" data-placement="right" />
  2549. <input type="password" name="not-a-password" value="" style="display: none" />
  2550. </div>
  2551.  
  2552. <% if (show_phone_verification) { %>
  2553. <div class="formgroup">
  2554. <input id="country_code" type="text" class="span2" style="margin-right: 10px; width: 5em;" value="<%= test.country_calling_code %>">
  2555. <input id="phone_number" type="text" style="width: 20em;" placeholder="Mobile number">
  2556. <i class="icon--single icon-help-circled cursor phone-number-help js-tooltip fnt-sz-small" data-placement="top"
  2557. data-original-title="You need a verified mobile number to apply. Rest assured, this will only be shared with <%= test.company_name %>."></i>
  2558. <div class="clear"></div>
  2559. </div>
  2560. <% } %>
  2561.  
  2562. <div class="text-center mlT">
  2563. <button class="btn btn-primary signup-button mlL mlR" name="commit" type="submit" value="request" data-analytics="SignupPassword" type="submit">Sign up</button><a href="#" class="cursor msT show-login-form">Log in</a>
  2564. </div>
  2565. </div>
  2566. </form>
  2567.  
  2568. <div class="clearfix"></div>
  2569. <div class="css-separator"></div>
  2570.  
  2571. <div class="homepage_signupgroup--social">
  2572. <div class="unstyled clearfix socialbuttons signup-social row text-center" id="social-signup">
  2573. <div class="social-btn-wrap span-xs-8">
  2574. <a class="btn btn-google btn-social btn-login-with-hr btn-signup-form" data-analytics="SignupGoogle" title="Sign up with Google"><i class="icon-gplus"></i></a>
  2575. </div>
  2576. <div class="social-btn-wrap span-xs-8">
  2577. <a class="btn btn-facebook btn-social btn-login-with-hr btn-signup-form" data-analytics="SignupFacebook" title="Sign up with Facebook"><i class="icon-facebook"></i></a>
  2578. </div>
  2579. </div>
  2580.  
  2581. </div>
  2582. <div>
  2583. <p style='font-size:0.85em;' class='plT gray-text'>By signing up you agree to our <a href='https://www.hackerrank.com/terms-of-service' target='_blank'>Terms of Service</a> and <a href='https://www.hackerrank.com/privacy' target='_blank'>Privacy Policy</a></p>
  2584. </div>
  2585. </div>
  2586.  
  2587.  
  2588. <div class="jscs-solve-later-action-block m <% if (!solveLaterEnabled) { %>hide<% } %>">
  2589. <div class="css-separator"></div>
  2590. <div class="slide-one">
  2591. Not ready yet? <a href="#" class="solve-later-button">Solve later</a>
  2592. <i data-original-title="Get an email with a link to this code challenge. You can attempt it at your convenience."
  2593. data-placement="right" class="icon--single icon-help-circled js-tooltip cursor fnt-sz-small"></i>
  2594. </div>
  2595.  
  2596. <div class="slide-two hide">
  2597. <div class="formgroup">
  2598. <p class="msB">You’ll receive this challenge in your email. Solve it when you’re ready to apply.</p>
  2599. <input id="js-solve-later-email-address" type="email" name="solve-later-email-address" class="css-solve-later-email-address" placeholder="Email"/>
  2600. <button class="btn btn-primary get-challenge-link-button">Get challenge link</button>
  2601. <p class="get-challenge-link-success-message hide"><i class="icon--single icon2-status_correct green"></i> A link to this challenge has been emailed to
  2602. <span id="solve-later-email-address-span"></span>
  2603. </p>
  2604. <p class="get-challenge-link-failed-message hide"><span class="get-challenge-link-failed-message-text error"></span></p>
  2605. </div>
  2606. </div>
  2607. </div>
  2608. </div>
  2609. </div>
  2610.  
  2611. <div class="login <% if(action == 'signup') {%>hidden<% } %> clear_form" id="hr-login">
  2612. <h5 class="text-center mlB">Log in with HackerRank to take <%- test.company_name %>'s challenge</h5>
  2613. <div class="homepage_admin">
  2614. <div class="form_outer_cover">
  2615. <div class="homepage_signupgroup--legacy">
  2616. <form id="legacy-login" class="legacy-form Bizible-Exclude" method="POST" autocomplete="off">
  2617. <div class="text-center alert error psT hidden mlB"></div>
  2618. <div class="formgroup">
  2619. <input id="login" type="text" name="login" value="" placeholder="Email/username" autocomplete="off"/>
  2620. <input type="text" name="not-an-email" value="" style="display: none" />
  2621. </div>
  2622. <div class="formgroup">
  2623. <input id="password" type="password" name="password" placeholder="Password" autocomplete="off"/>
  2624. <input type="password" name="not-a-password" value="" style="display: none" />
  2625. </div>
  2626. <div class="mlB msT text-center">
  2627. <button class="btn btn-primary login-button auth" name="commit" type="submit" value="request" data-analytics="LoginPassword" type="submit">Log In</button>
  2628. </div>
  2629.  
  2630. <div class="fnt-sz-mid fnt-wt-500 text-center">
  2631. <a href="#" class="cursor show-password-reset-form">Forgot password?</a> | <a href="#" class="cursor show-signup-form">Sign up</a>
  2632. </div>
  2633. </form>
  2634. <div class="password-reset-form mlT" style="display: none;">
  2635. <form name="password-reset" class="password-reset">
  2636. <div class="text-center alert psT hidden forgot-password-message mlB fnt-sz-mid"></div>
  2637. <div class="formgroup">
  2638. <input id="forgot-password-email" type="text" name="forgot-password-email" value="" placeholder="Email/username" autocomplete="off" class="forgot_password_expansion" style="width: 100%"/>
  2639. <input type="text" name="not-an-email" value="" style="display: none" />
  2640. </div>
  2641. <div class="msB msT text-center"><input type="submit" class="btn reset-password" value="Reset password"/></div>
  2642. </form>
  2643. </div>
  2644.  
  2645. <div class="css-separator"></div>
  2646. <div class="homepage_signupgroup--social">
  2647. <div class="unstyled clearfix socialbuttons login-social row text-center" id="social-signup">
  2648. <div class="social-btn-wrap span-xs-third">
  2649. <a class="btn btn-google btn-social btn-login-with-hr btn-login-form" data-analytics="SignupGoogle" title="Log in with Google"><i class="icon-gplus"></i></a>
  2650. </div>
  2651. <div class="social-btn-wrap span-xs-third">
  2652. <a class="btn btn-facebook btn-social btn-login-with-hr btn-login-form" data-analytics="SignupFacebook" title="Log in with Facebook"><i class="icon-facebook"></i></a>
  2653. </div>
  2654. <div class="social-btn-wrap span-xs-third">
  2655. <a class="btn btn-github btn-social btn-login-with-hr btn-login-form" data-analytics="SignupGithub" title="Log in with Github"><i class="icon-github"></i></a>
  2656. </div>
  2657. </div>
  2658. </div>
  2659. </div>
  2660. </div>
  2661. </div>
  2662. </div>
  2663.  
  2664. <div class="login-selection hidden" id="hr-login-selection">
  2665. <h5 class="text-center msB">Log in with HackerRank to take <%- test.company_name %>'s challenge</h5>
  2666. <div class="homepage_admin">
  2667. <div class="form_outer_cover">
  2668. <form id="legacy-selection" class="legacy-form pdT Bizible-Exclude" method="POST" autocomplete="off">
  2669. <div class="text-center alert error psT mlB hidden"></div>
  2670. <div class="homepage_signupgroup--legacy mlB plL">
  2671. <input type="radio" class="hr-sleek-input" name="hacker-select" value="logged-in-user" id="logged-in-user" checked="checked"/>
  2672. <label for="logged-in-user"><span></span><%= model.email %></label>
  2673. <input type="radio" class="hr-sleek-input" name="hacker-select" value="invited-user" id="invited-user"/>
  2674. <label for="invited-user"><span></span><%= possibleHacker.email %></label>
  2675. <div class="formgroup password-input" style="display:none;">
  2676. <input id="selection-password" class="mlT" type="password" name="password" placeholder="Password" autocomplete="off"/>
  2677. <input type="password" name="not-a-password" value="" style="display: none" />
  2678. </div>
  2679. </div>
  2680. <div class="msT text-center">
  2681. <button class="btn btn-primary continue-button auth msR" name="commit" type="submit" value="request" type="submit">Continue</button>
  2682. <div class="psT">
  2683. <a href="#" class="fnt-sz-mid fnt-wt-500 switch-user">Switch to a different user</a>
  2684. </div>
  2685. </div>
  2686. </form>
  2687. </div>
  2688. </div>
  2689. </div>
  2690.  
  2691. </div>
  2692.  
  2693. </script>
  2694. <script type="text/template" id="recruit/compiletest-testcase">
  2695. <hr>
  2696. <div class="run-time full-width" id="testcase-scroll-<%- tno %>">
  2697. <p class="title <%- st_class %>">Testcase <span class="testcase-no"><%- tno %></span>: <em><%=compiler_msg%></em></p>
  2698.  
  2699. <% if (input) {%>
  2700. <p class="field-label">Input&nbsp;<% if(input_url){%><a class = 'download_link' href = "<%- input_url%>" title="Download Input">[<i class="icon icon-download xsmall" ></i>Download]</a><%}%></p>
  2701. <pre class="error-output"><code class="testcase-expected-output"><%- input %></code></pre>
  2702.  
  2703. <% } %>
  2704. <% if (!(_.isUndefined(output) || _.isNull(output))) { %>
  2705. <p class="field-label"><%= output_label %></p>
  2706. <pre class="error-output"><code class="testcase-output"><%- output %></code></pre>
  2707. <% } else { %>
  2708. <p class="field-label">Your Output</p>
  2709. <pre class="error-output"><code class="testcase-output">Output hidden</code></pre>
  2710. <% } %>
  2711. <% if (exp_output) { %>
  2712. <p class="field-label">Expected Output&nbsp;<% if(expected_output_url){%><a class = 'download_link' href = "<%- expected_output_url%>" title="Download Output">[<i class="icon icon-download xsmall"></i>Download]</a><%}%></p>
  2713. <pre class="error-output"><code class="testcase-expected-output"><%- exp_output %></code></pre>
  2714. <% } %>
  2715.  
  2716. <% if (output_debug) { %>
  2717. <p class="field-label">Debug Output</p>
  2718. <pre class="error-output"><code class="testcase-output"><%- output_debug %></code></pre>
  2719. <% } %>
  2720.  
  2721. <% if (censored_stderr) { %>
  2722. <p class="field-label">Error (stderr)</p>
  2723. <pre class="error-output"><code class="testcase-output"><%- censored_stderr %></code></pre>
  2724. <% } %>
  2725.  
  2726. <% if (customchecker_message) { %>
  2727. <p class="field-label">Custom Checker Error Message</p>
  2728. <pre class="error-output"><code class="testcase-output"><%- customchecker_message %></code></pre>
  2729. <% } %>
  2730.  
  2731. <% if (_.isNumber(score)) { %>
  2732. <p class="field-label">Score</p>
  2733. <pre class="error-output"><code class="testcase-expected-output"><%- score %></code></pre>
  2734. <% } %>
  2735. </div>
  2736.  
  2737. </script>
  2738. <script type="text/template" id="recruit/question-fileupload">
  2739. <h5 >ANSWER - Please upload your file here (Max size: 50MB)</h5>
  2740.  
  2741. <div class="mlT current-answer-section hidden">
  2742. Current Answer: <span id="current_answer" style="padding-left: 10px"></span>
  2743. </div>
  2744.  
  2745. <div class="mlT">
  2746. <input type="file" data-loading-text="Loading" data-text="Data text" id="candidate-file-input" name="answer" title="Choose a file" class="hidden">
  2747. <label for="candidate-file-input" class="btn">Upload File</label>
  2748. <span class="file-info"></span>
  2749. </div>
  2750.  
  2751. </script>
  2752. <script type="text/template" id="recruit/question-mcq">
  2753. <% if (question.type == "mcq") { %>
  2754. <h5 class="psB msT"><%- i18next.t('question.mcq.pick_one_choice') %></h5>
  2755. <% } else { %>
  2756. <h5 class="psB msT"><%- i18next.t('question.mcq.pick_correct_choices') %></h5>
  2757. <% } %>
  2758. <ul class="mcq-question-choices">
  2759. <% if (question.type == "mcq") { %>
  2760. <% i=0;_.each(question.options, function(o){ i++; %>
  2761. <li><input type="radio" name="mcqopts-<%=question.unique_id%>" id="mcqopts-<%=question.unique_id%><%- i %>" value="<%- i %>"/>
  2762. <label for="mcqopts-<%=question.unique_id%><%- i %>">
  2763. <% if(question.richtext == "True"){ %>
  2764. <div class="ck_table-wrap">
  2765. <%= o %>
  2766. </div>
  2767. <% } else { %>
  2768. <%- o %>
  2769. <%}%>
  2770. </label></li>
  2771. <% }); %>
  2772. <% } else { %>
  2773. <% i=0;_.each(question.options, function(o){ i++; %>
  2774. <li><input type="checkbox" name="mcqopts-<%=question.unique_id%>" id="mcqopts-<%=question.unique_id%><%- i %>" value="<%- i %>"/><label for="mcqopts-<%=question.unique_id%><%- i %>">
  2775. <% if(question.richtext == "True"){ %>
  2776. <div class="ck_table-wrap">
  2777. <%= o %>
  2778. </div>
  2779. <% } else { %>
  2780. <%- o %>
  2781. <%}%>
  2782. </label></li>
  2783. <% }); %>
  2784. <% } %>
  2785. <a href="#" class="clearall"><%- i18next.t('question.mcq.clear_selection') %></a>
  2786. <% if (question.explanation_box && question.explanation_box == "true") { %>
  2787. <label for="explanation"><%- i18next.t('explanation') %></label><textarea id="explanation" name="explanation" rows="10" cols="80"></textarea>
  2788. <% } %>
  2789. <span class="block-selection"></span>
  2790. <div class="saved-container"></div>
  2791. </ul>
  2792.  
  2793. </script>
  2794. <script type="text/template" id="recruit/question-design">
  2795. <div id="editor" class="codeshell mlT mlB"></div>
  2796.  
  2797. <div class="output-area-wrap hidden padded light-wrap">
  2798. <div class="output-area" id="output-area">
  2799. <p class="status">Status: <span class="status-msg">Uploading..</span></p>
  2800. </div>
  2801. <div>
  2802. <p class="output-message"></p>
  2803. </div>
  2804. </div>
  2805.  
  2806. <div class="span16 hidden center-block light-wrap" style="height:600px;" id="runstatus-load">
  2807. <div class='gray'> <div style='background: url(<%- asset_path('hackerrank_spinner_64x64.gif') %>); height: 64px; width: 64px; display: inline-block;'></div> </div>
  2808. </div>
  2809. <iframe class="span16 no-padding hidden light-wrap" sandbox="allow-forms allow-modals allow-popups allow-scripts allow-same-origin" height="600px" name="runstatus" id="runstatus" src="">
  2810. </iframe>
  2811.  
  2812. </script>
  2813. <script type="text/template" id="recruit/compiletest-base">
  2814. <div class="output-area-wrap">
  2815. <div class="output-area padded light-wrap" id="output-area" aria-live="assertive">
  2816.  
  2817. <!-- new submission view -->
  2818. <% if(showAllTestCases) { %>
  2819. <div class="testcase-submission-view">
  2820. <div class="psT psB block-center mlB checker-progress-bar-wrap">
  2821. <span class="status-message block-center text-center bold large color-green psR msB">Processing..</span>
  2822. <div class="checker-progress-bar">
  2823. <div class="fill-bar" style="width: <%- fill_percent %>%;"></div>
  2824. <div class="blank-bar msB" style="width: <%- blank_percent %>%;"></div>
  2825. <span class="custom-input-msg text-center bold large psR msB hide"><i class="icon-bulb icon-large"></i>Tip: Debug your code against custom input</span>
  2826. <div class='clearfix'></div>
  2827. </div>
  2828. </div>
  2829. <div class="submission_testcases-results testcases-results clearfix mjL" id="testcase-table">
  2830. <% for(var i = 1; i <= totalTestCasesCount; i+=1) { %>
  2831. <p class="testcase-number-<%- i %> js-scroll-to-testcase" style="cursor: pointer;" data-id="<%- i %>">
  2832. <span class="testcase-num">Test Case #<%- i %>: </span>
  2833. <i class="testcase-status-icon icon-hourglass"></i>
  2834. <span class="testcase-message">Waiting...</span>
  2835. </p>
  2836. <% } %>
  2837. </div>
  2838. </div>
  2839. <% } %>
  2840. <!-- submission view ends here -->
  2841.  
  2842. <p class="status <% if(showAllTestCases) { %>hide<% } %>">Status: <span class="status-msg" role="alert">Uploading..</span></p>
  2843. <%if($("#customtestcase").prop("checked") === false){ %>
  2844. <span class="custom-input-msg-compile bold large hide psR msB <% if(showAllTestCases) { %>hide<% }%>"><i class="icon-bulb icon-large"></i>Tip: Debug your code against custom input</span>
  2845. <%}%>
  2846. <span class="bb-runall hide" role="alert">Running your code against all testcases...</span>
  2847. <div class="alert mlB hide" id="compile-command" aria-live="assertive">
  2848. <header class="command-header"></header>
  2849. <p><pre class="command" role="alert"></pre></p>
  2850. </div>
  2851. <div class="alert mlB hide" id="error-message" aria-live="assertive">
  2852. <header class="compile-header"></header>
  2853. <p><pre class="compile-message" role="alert"></pre></p>
  2854. </div>
  2855. <div class="mlB hide" id="success-message" aria-live="assertive">
  2856. <header class="compile-header"></header>
  2857. <p><pre class="compile-message" role="alert"></pre></p>
  2858.  
  2859. </div>
  2860. <div class="mlB hide" id="coverage-message" aria-live="assertive">
  2861. <hr>
  2862. <div class="run-time full-width" aria-live="assertive">
  2863. <p class="field-label" role="alert"></p>
  2864. <pre class="error-output" role="alert"><code class="testcase-output"></code></pre>
  2865. </div>
  2866. </div>
  2867. <div class="mlB hide" id="test-message" aria-live="assertive">
  2868. <hr>
  2869. <div class="run-time full-width">
  2870. <p class="field-label" role="alert"></p>
  2871. <pre class="error-output"><code class="testcase-output"></code></pre>
  2872. </div>
  2873. </div>
  2874. <span class="testcases" role="alert"></span>
  2875. <span class="bb-runall hide" role="alert">Running your code against all testcases...</span>
  2876. </div>
  2877. </div>
  2878.  
  2879. </script>
  2880. <script type="text/template" id="recruit/footer">
  2881. <div class="text-center fnt-sz-mid">
  2882. <% if(test.footer_copyright) { %>
  2883. <%= test.footer_copyright %>
  2884. <% } %>
  2885. </div>
  2886. <div class="fnt-sz-mid">
  2887. <center class="mmT mmB">
  2888. <a class="mdR mdL" href="/aboutus" target="_blank">About</a>
  2889. <a class="mdR" href="/privacy" target="_blank">Privacy Policy</a>
  2890. <a class="mdR" href="/terms-of-service" target="_blank">Terms of Service</a>
  2891. <center>
  2892. </div>
  2893.  
  2894. </script>
  2895.  
  2896. <div id="wrapper" class="no-header wrapper-height">
  2897. <div class="loading_box" style="display: none;">
  2898. <span>
  2899. <img src="https://hrcdn.net/hackerrank/assets/hackerrank_spinner_64x64-4f0677160e859e0e7798b44c8f33c3ba.gif" alt="Hackerrank spinner 64x64" style="display: none;">
  2900. <span class="recruitmsg">Loading..</span>
  2901. </span>
  2902. </div>
  2903. <div id="navigation">
  2904. <header aria-label="Information about test in this banner" class="nav-make-fixed min-1024 page-header hr_haslogo " id="page-header">
  2905. <div class="row-fluid">
  2906.  
  2907. <span class="span6 nav-logo">
  2908. <a class="HackerRankLogo backbone company-logo-candidate-site" aria-hidden="true">
  2909. <img src="https://s3.amazonaws.com/istreet-logos/25631/acc440" alt="Hackerrank Logo" aria-hidden="true">
  2910. </a>
  2911. <span style="padding-left:50px;" class="text-ellipsis txt-white customer-font-color mlA" aria-level="2" aria-atomic="true" aria-label="Full Stack Developer Test" title="Full Stack Developer Test">
  2912.  
  2913. Full Stack Developer Test
  2914. </span>
  2915. </span>
  2916.  
  2917.  
  2918. <div class="span2 text-center" aria-level="2" aria-label="Time Left in Test:">
  2919. <div class="pmT pmB mmT mmB timerspan" aria-atomic="true"><i aria-hidden="true" class="icon-clock txt-alt-grey"></i>&nbsp;<span aria-atomic="true" class="txt-white customer-font-color is-countdown" id="countdown-timer">01h : 08m : 56s</span><br><span aria-hidden="true" class="timer-tag customer-font-color" id="timertag">to test end</span></div>
  2920. </div> <!-- .span3 -->
  2921. <div class="span1" aria-hidden="true">&nbsp;</div>
  2922.  
  2923. <div class="span4">
  2924. <div class="mlT txt-white customer-font-color span16">
  2925. <div class="dark-theme-progress small span8 pmT" aria-hidden="true">
  2926. <div class="base">
  2927. <div class="cover progress-done" style="width: 87px;"></div>
  2928. </div>
  2929. </div>
  2930. &nbsp;<span class="js-progress span8 pdL" aria-level="2" aria-label="Questions Attempted:"><span class="qdone">14</span>/<span class="qcount">16</span> Attempted</span>
  2931. <span class="js-loader span8 pdL hidden"> <img src="https://hrcdn.net/hackerrank/assets/hackerrank_spinner_64x64-4f0677160e859e0e7798b44c8f33c3ba.gif" height="24" width="24"></span>
  2932. </div>
  2933. </div> <!-- .span4 -->
  2934.  
  2935. <div class="span3" aria-hidden="true">
  2936. <span class="text-ellipsis txt-white customer-font-color mlT"><i class="icon-user txt-alt-grey fnt-sz-mid"></i>&nbsp;Mario Bou Debes</span>
  2937. </div> <!-- .span2 -->
  2938.  
  2939. </div> <!-- .row-fluid -->
  2940. </header>
  2941.  
  2942.  
  2943. </div>
  2944. <div class="global-message-wrapper" style="display: none">
  2945. <div class="global-message psA">
  2946. </div>
  2947. </div>
  2948. <div id="side-navigation">
  2949. <div id="side-navigation">
  2950. <nav class="page_navigation-sidebar expand hr_slide-away-element ligter-sidebar hr-candidate-rules" id="sidebar" style="top: 70px;">
  2951. <div class="mini-dash" style="display:none">
  2952. <!--<footer class="clearfix">
  2953. <p class="pull-left rank"><i class="icon-up-dir-1 success"></i> 5572<span class="sub-label">Points</span></p>
  2954. <p class="pull-right rank"><i class="icon-up-dir-1 success"></i> 242<span class="sub-label">Rank</span></p>
  2955. -->
  2956. </div>
  2957. <div class=" sidebar_nav-list fixed-nav questions-indicator" aria-level="1" role="menubar"><a href="cql427eis7a/questions" data-balloon="Back to Questions List" data-balloon-pos="right" aria-label="Back to Questions List" aria-level="2" class="backbone js-navlink "><i class="nav-icon icon-list-bullet-large"></i></a><a href="cql427eis7a/instructions" aria-label="At any time during the test you can access our FAQ as well as other platform help on this tab." aria-level="2" class="backbone js-navlink ">
  2958. <i class="nav-icon icon-help-circled js-instruction-link" data-placement="right" data-trigger="manual" aria-label="Instructions. At any time during the test you can access our FAQ as well as other platform help on this tab."></i>
  2959. </a></div>
  2960.  
  2961. <div class="sidebar-scroll-list-container" aria-label="Questions">
  2962. <div class="unstyled sidebar_nav-list psT questions-indicator questions-nav" role="menu" aria-level="2"><span class="section-break"> - Frontend &amp; HTTP -</span><a href="cql427eis7a/questions/ad11g6fao6d" class="js-navlink qnav-1 answered " aria-label="Question 1 " aria-atomic="true">
  2963. <span class="quest-number">1</span>
  2964. </a><a href="cql427eis7a/questions/1qe1ig2t7cn" class="js-navlink qnav-2 answered " aria-label="Question 2 " aria-atomic="true">
  2965. <span class="quest-number">2</span>
  2966. </a><a href="cql427eis7a/questions/4c061c248cbcf" class="js-navlink qnav-3 answered " aria-label="Question 3 " aria-atomic="true">
  2967. <span class="quest-number">3</span>
  2968. </a><a href="cql427eis7a/questions/4e60dsm2t4g" class="js-navlink qnav-4 answered " aria-label="Question 4 " aria-atomic="true">
  2969. <span class="quest-number">4</span>
  2970. </a><a href="cql427eis7a/questions/36i3q773h14" class="js-navlink qnav-5 answered " aria-label="Question 5 " aria-atomic="true">
  2971. <span class="quest-number">5</span>
  2972. </a><a href="cql427eis7a/questions/g6nk4744maa" class="js-navlink qnav-6 answered " aria-label="Question 6 " aria-atomic="true">
  2973. <span class="quest-number">6</span>
  2974. </a><a href="cql427eis7a/questions/br71n8adf45" class="js-navlink qnav-7 answered " aria-label="Question 7 " aria-atomic="true">
  2975. <span class="quest-number">7</span>
  2976. </a><a href="cql427eis7a/questions/2se9mc0k5os" class="js-navlink qnav-8 answered " aria-label="Question 8 " aria-atomic="true">
  2977. <span class="quest-number">8</span>
  2978. </a><span class="section-break"> - System Design &amp; Data Structures -</span><a href="cql427eis7a/questions/7klpphia029" class="js-navlink qnav-9 answered " aria-label="Question 9 " aria-atomic="true">
  2979. <span class="quest-number">9</span>
  2980. </a><a href="cql427eis7a/questions/7mms05ihjlj" class="js-navlink qnav-10 answered " aria-label="Question 10 " aria-atomic="true">
  2981. <span class="quest-number">10</span>
  2982. </a><a href="cql427eis7a/questions/1lbkkjab1tn" class="js-navlink qnav-11 answered " aria-label="Question 11 " aria-atomic="true">
  2983. <span class="quest-number">11</span>
  2984. </a><a href="cql427eis7a/questions/451ibtnn0e9" class="js-navlink qnav-12 answered " aria-label="Question 12 " aria-atomic="true">
  2985. <span class="quest-number">12</span>
  2986. </a><a href="cql427eis7a/questions/e75dln44" class="js-navlink qnav-13 answered " aria-label="Question 13 " aria-atomic="true">
  2987. <span class="quest-number">13</span>
  2988. </a><a href="cql427eis7a/questions/1tfgjqhbj3i" class="js-navlink qnav-14 answered " aria-label="Question 14 " aria-atomic="true">
  2989. <span class="quest-number">14</span>
  2990. </a><span class="section-break"> - Coding -</span><a href="cql427eis7a/questions/fkftqm61odq" class="js-navlink qnav-15 not-answered active" aria-label="Question 15 Currently Selected" aria-atomic="true">
  2991. <span class="quest-number">15</span>
  2992. </a><a href="cql427eis7a/questions/47hrredgd48" class="js-navlink qnav-16 not-answered " aria-label="Question 16 " aria-atomic="true">
  2993. <span class="quest-number">16</span>
  2994. </a></div>
  2995. </div>
  2996. </nav>
  2997. </div>
  2998.  
  2999. </div>
  3000. <div id="content" style="height:100%"><div class="question-base">
  3001. <textarea id="shouter" style="position: absolute !important; height: 25px; width: 25px;resize: none;" aria-live="assertive" role="alert" aria-label="Notifications will appear here" tabindex="-1"></textarea>
  3002. <div class="container que-fkftqm61odq" role="main" style="margin-top:30px">
  3003. <div class="title-name-wrapper">
  3004. <h4 class="qbookmark pull-left mmR mmT" aria-hidden="true"><a class="js-bookmark" data-qid="fkftqm61odq" style="cursor:pointer"><i class="icon-star-empty" title="Mark for later"></i></a></h4>
  3005. <h3 class="title pull-left qtitle" aria-label="Question Title" tabindex="0">The Elevator Superstition</h3>
  3006. <h4 class="bold pull-right qpoints"></h4>
  3007. <div class="clear"></div>
  3008. </div>
  3009. <div class="container--inner">
  3010.  
  3011. <div aria-label="Question Content" class="challenge-text hrx-version ck_table-wrap fadeinContent" style="min-height:100px;"><p dir="ltr">You check in at a hotel — one of the tallest buildings in the world. When taking the elevator, you realize that particular hotel has a superstition: There are no floors whose number has a '4' or '13' as part of it.</p>
  3012.  
  3013. <p>&nbsp;</p>
  3014.  
  3015. <p dir="ltr">That means that hotel has no 4th floor, nor a 13th, nor a 134th, nor a 113rd – but they do have the 103rd. Therefore, first floors are numbered as 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, and so on...</p>
  3016.  
  3017. <p dir="ltr">&nbsp;</p>
  3018.  
  3019. <p dir="ltr">The hotel wants to build a second tower but they don't want to go through the hassle of numbering floors by hand. They want to have an algorithm that, given a "real" floor number, returns the "lucky" version and removes any floors that contain '4' or '13' as part of their numbers.</p>
  3020.  
  3021. <p dir="ltr">&nbsp;</p>
  3022.  
  3023. <p dir="ltr"><strong>Example</strong></p>
  3024.  
  3025. <p dir="ltr">&nbsp;</p>
  3026.  
  3027. <p dir="ltr">Given that the real floor number <strong>12</strong>, its “lucky” version will be <strong>15</strong>:</p>
  3028.  
  3029. <p dir="ltr">&nbsp;</p>
  3030.  
  3031. <pre><code class="language-javascript">Real: 1 2 3 4 5 6 7 8 9 10 11 12
  3032. Lucky: 1 2 3 5 6 7 8 9 10 11 12 15</code></pre>
  3033. </div>
  3034. <div class="clear"></div>
  3035. <div class="soft-divider mlB"></div>
  3036.  
  3037. <div class="mlB">
  3038. <strong>YOUR ANSWER</strong>
  3039. <div class="pull-right mlB hidden js-pinheader"><a class="btn js-btnpin" data-pin="False" title="Pin/unpin the Run and Submit code buttons below"><i class="icon--single icon-pencil"></i> Pin code header/footer</a></div>
  3040. </div>
  3041. <div class="clear"></div>
  3042.  
  3043. <div class="qcontent fadeinContent" style="min-height:200px;"><div class="question-coding" style="width: 100%;">
  3044. <div class="banner mlB js-codeeditor csx-tour-banner">
  3045. <div class="js-closetour csx-closetour-button"><a class="btn btn-link">✖</a></div>
  3046. <div class="row csx-tour-row">
  3047. <div class="span15 mmT" style="text-align:left"> We recommend you take a quick tour of our editor before you proceed. The timer will pause up to 90 seconds for the tour. &nbsp; <a class="js-starttour btn btn-small btn-primary">Start tour</a></div>
  3048. </div>
  3049. </div>
  3050. <div id="input-output-help"></div>
  3051. <style>.code-body .CodeMirror-scroll{overflow-y: auto !important;}</style>
  3052.  
  3053. <div id="editor" class="codeshell mlT mlB">
  3054. <div class="clearfix grey-header fixed-hand0 cap plL plR psT psB" style="position: relative;">
  3055. <div class="msT pull-left"><em id="status-text">Draft saved 07:25 pm</em></div>
  3056.  
  3057.  
  3058. <div class="pull-right">
  3059.  
  3060.  
  3061. <div class="inline">
  3062.  
  3063. <a class="js-showoriginalcode btn btn-medium"> Original code </a>
  3064.  
  3065. </div>
  3066.  
  3067.  
  3068. <div class="inline large lines inverse pull-right msT msL">
  3069.  
  3070.  
  3071.  
  3072. <i id="vertical-icon" style="background-repeat: no-repeat; background-position: 50% 50%; border:none; float:left; margin-right: 7px;" class="orientation-icon js-tooltip" data-placement="bottom" title="" data-analytics="VerticalViewSwitch" data-attr-question_id="fkftqm61odq" data-attr-attempt_id="5530039" data-attr-test_id="cql427eis7a" data-original-title="Switch to vertical layout"></i>
  3073.  
  3074. <a class="hide" style="display:none;"></a>
  3075. <div class="settings-editor" style="position:relative; margin-left: 0px;">
  3076. <a class="cursor no-select" data-analytics="CodeShellShowPreferences" id="show-preferences"><i class="icon-cog icon--grey no-select"></i></a>
  3077. <div id="pref-pane" style="position: absolute;right: -0.5em;top: 2em;z-index: 9;background: #fff;border: 1px solid #ddd;border-radius: 5px;padding: 10px; width: 20em; display: none;">
  3078. <div style="position: absolute;width: 0;right: 0.8em;height: 0;border-left: 7px solid transparent;border-right: 7px solid transparent;border-bottom: 7px solid #ddd;top: -0.4em;"></div>
  3079.  
  3080. <div class="formgroup horizontal">
  3081. <label class="span5">Editor Mode</label>
  3082. <div class="inline">
  3083. <div class="btn-group no-select">
  3084. <a data-analytics="CodeShellEditorMode" data-attr1="Emacs" class="cursor emacs btn btn-small btn-white editor-mode-button no-select" data-editor="emacs">Emacs</a>
  3085. <a data-analytics="CodeShellEditorMode" data-attr1="Normal" class="cursor default btn btn-small btn-white editor-mode-button no-select btn-primary" data-editor="sublime">Normal</a>
  3086. <a data-analytics="CodeShellEditorMode" data-attr1="Vim" class="cursor vim btn btn-small btn-white editor-mode-button no-select" data-editor="vim">Vim</a>
  3087. </div>
  3088. </div>
  3089. </div>
  3090.  
  3091.  
  3092. <div class="formgroup horizontal">
  3093. <label class="span5">Tab Spaces</label>
  3094. <div class="inline">
  3095. <div class="btn-group no-select">
  3096. <a data-analytics="CodeShellEditorSpace" data-attr1="2" class="cursor 2space btn btn-small btn-white editor-tabspace-button no-select" data-editor="2">2 spaces</a>
  3097. <a data-analytics="CodeShellEditorSpace" data-attr1="4" class="cursor 4space btn btn-small btn-white editor-tabspace-button no-select btn-primary" data-editor="4">4 spaces</a>
  3098. <a data-analytics="CodeShellEditorSpace" data-attr1="8" class="cursor 8space btn btn-small btn-white editor-tabspace-button no-select" data-editor="8">8 spaces</a>
  3099. </div>
  3100. </div>
  3101. </div>
  3102.  
  3103. <div class="formgroup horizontal">
  3104. <label class="span5">Intellisense</label>
  3105. <div class="inline">
  3106. <div class="btn-group no-select">
  3107. <a data-analytics="CodeShellAutoComplete" data-attr1="Enable" class="cursor emacs btn btn-small btn-white editor-autocomplete-button no-select btn-primary" data-editor="true">Enable</a>
  3108. <a data-analytics="CodeShellAutoComplete" data-attr1="Disable" class="cursor default btn btn-small btn-white editor-autocomplete-button no-select" data-editor="false">Disable</a>
  3109. </div>
  3110. </div>
  3111. </div>
  3112.  
  3113.  
  3114.  
  3115. <div class="formgroup horizontal">
  3116. <label class="span5"> Editor tour</label>
  3117.  
  3118. <a class=" btn btn-small"> Show tour </a>
  3119.  
  3120. </div>
  3121.  
  3122.  
  3123. </div>
  3124. </div>
  3125. </div>
  3126. <div class="pull-right lang-placeholder">
  3127. <div class="dummy-lang-container hide"></div>
  3128. <div class="select2-container" id="s2id_select-lang"><a href="javascript:void(0)" onclick="return false;" class="select2-choice" tabindex="-1"> <span>PHP</span><abbr class="select2-search-choice-close"></abbr> <div><b></b></div></a><input class="select2-focusser select2-offscreen" type="text" id="s2id_autogen3" tabindex="-1" aria-label="Type the language that you want to code in and press enter"><div class="select2-drop select2-display-none"> <div class="select2-search select2-search-hidden select2-offscreen"> <input type="text" autocomplete="off" autocorrect="off" autocapitilize="off" spellcheck="false" class="select2-input" aria-label="Type the language that you want to code in and press enter"> </div> <ul class="select2-results"> </ul></div></div><input type="hidden" id="select-lang" tabindex="-1" class="select2-offscreen" value="php" style="display: inline-block;">
  3129. </div>
  3130. <div class="clearfix"></div>
  3131. </div>
  3132. </div>
  3133.  
  3134. <div class="hr_tour-code-solution movable-hand flex-row" style="display: flex;">
  3135.  
  3136. <div class="code-checker">
  3137. <div id="notification-message" class="clearfix grey-header cap hidden "> </div>
  3138. <div class="code-editors" style="max-height: 412px;">
  3139.  
  3140. <div class="code-head not-allowed" style="display: block;">
  3141.  
  3142. <textarea id="codeheadview" style="width: 100%; display: none;"></textarea><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 4.9826px; left: 46.4236px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-vscrollbar" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 41px; margin-bottom: -19px; border-right-width: 11px; min-height: 68px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>3</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4.44444px; top: 0px; height: 20px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: -41.9896px; width: 41px;"></div><div class="CodeMirror-gutter-wrapper CodeMirror-activeline-gutter" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-operator">&lt;?</span><span class="cm-variable">php</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 11px; width: 1px; border-bottom: 0px solid transparent; top: 68px;"></div><div class="CodeMirror-gutters" style="height: 79px; left: -0.989586px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div><div class="CodeMirror-gutter CodeMirror-foldgutter"></div></div></div></div>
  3143. </div>
  3144. <div class="loading-mode" style="display: none;">Loading Editor... </div>
  3145. <div class="code-body" style="display: block;">
  3146.  
  3147. <textarea id="codeview" style="width: 100%; display: none;"></textarea><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 4.98267px; left: 45.9722px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-vscrollbar" cm-not-content="true" style="width: 18px; pointer-events: none;"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" cm-not-content="true" style="height: 18px; pointer-events: none;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 41px; margin-bottom: 0px; border-right-width: 30px; min-height: 168px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>11</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 3.99306px; top: 0px; height: 20px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: -41.9896px; width: 41px;"></div><div class="CodeMirror-gutter-wrapper CodeMirror-activeline-gutter" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div><div class="CodeMirror-gutter-elt" style="left: 29px; width: 11px;"><div class="CodeMirror-foldgutter-open CodeMirror-guttermarker-subtle"></div></div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">/*</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-comment">* Complete the function below.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-comment">*/</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div><div class="CodeMirror-gutter-elt" style="left: 29px; width: 11px;"><div class="CodeMirror-foldgutter-open CodeMirror-guttermarker-subtle"></div></div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">function</span> <span class="cm-def">getLuckyFloorNumber</span>(<span class="cm-variable-2">$n</span>) {</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; border-bottom: 0px solid transparent; top: 168px;"></div><div class="CodeMirror-gutters" style="height: 198px; left: -0.989586px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div><div class="CodeMirror-gutter CodeMirror-foldgutter"></div></div></div></div>
  3148. </div>
  3149.  
  3150. <div class="code-tail not-allowed" style="display: block;">
  3151.  
  3152. <textarea id="codetailview" style="width: 100%; display: none;"></textarea><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 4.98267px; left: 46.4236px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-vscrollbar" cm-not-content="true" style="bottom: 0px;"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 41px; margin-bottom: -19px; border-right-width: 11px; min-height: 268px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>24</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4.44444px; top: 0px; height: 20px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: -41.9896px; width: 41px;"></div><div class="CodeMirror-gutter-wrapper CodeMirror-activeline-gutter" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable-2">$file</span> <span class="cm-operator">=</span> <span class="cm-builtin">fopen</span>(<span class="cm-builtin">getenv</span>(<span class="cm-string">"OUTPUT_PATH"</span>), <span class="cm-string">"w"</span>);</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable-2">$__fp</span> <span class="cm-operator">=</span> <span class="cm-builtin">fopen</span>(<span class="cm-string">"php://stdin"</span>, <span class="cm-string">"r"</span>);</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-builtin">fscanf</span>(<span class="cm-variable-2">$__fp</span>, <span class="cm-string">"%d"</span>, <span class="cm-variable-2">$n</span>);</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable-2">$res</span> <span class="cm-operator">=</span> <span class="cm-variable">getLuckyFloorNumber</span>(<span class="cm-variable-2">$n</span>);</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-builtin">fwrite</span>(<span class="cm-variable-2">$file</span>, <span class="cm-variable-2">$res</span> . <span class="cm-string">"\n"</span> );</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-builtin">fclose</span>(<span class="cm-variable-2">$file</span>);</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">23</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-operator">?&gt;</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -41.9896px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">24</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="">​</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 11px; width: 1px; border-bottom: 0px solid transparent; top: 268px;"></div><div class="CodeMirror-gutters" style="height: 279px; left: -0.989586px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div><div class="CodeMirror-gutter CodeMirror-foldgutter"></div></div></div></div>
  3153. </div>
  3154. <div class="clearfix"></div>
  3155. </div>
  3156. <div id="codeeditor-statusbar" class="clearfix psA codeeditor_statusbar">
  3157. <span id="statusbar-mode"></span>
  3158. <div class="pull-right">
  3159. <span id="statusbar-line">Line: 10</span>
  3160. <span id="statusbar-col">Col: 1</span>
  3161. <span id="statusbar-count"></span>
  3162. </div>
  3163. </div>
  3164. </div>
  3165. </div><div class="clearfix pmR pmL pmB plT fixed-hand1 codeshell-footer">
  3166. <div class="pull-right">
  3167.  
  3168.  
  3169. <button class="btn bb-compile msR " data-analytics="Compile and Test">Run Code</button>
  3170.  
  3171.  
  3172. <button class="btn btn-primary bb-submit ans-submit" data-analytics="Submit Code">Submit code &amp; Continue</button>
  3173.  
  3174.  
  3175. <div class="msT">(You can submit any number of times)</div>
  3176.  
  3177. </div>
  3178. <div class="pull-left inline">
  3179.  
  3180.  
  3181.  
  3182. <div class="mmT">
  3183. <label for="customtestcase"><div class="custom-checkbox-v3"><input type="checkbox" id="customtestcase"><span></span></div><span class="lmT msL">Test against custom input</span></label>
  3184.  
  3185. </div>
  3186.  
  3187. </div>
  3188.  
  3189. <div class="js-custom-input hide-new-custom"><div data-reactroot="" class="customInputV2"><div class="container-fluid"><div class="visual-div"><div class="msT nav "><a href="#" data-analytics="raw-format" class="links link-unactive">Raw Format</a><a href="#" data-analytics="visual-format" class="links link-active">Visual Format</a><span class="quick_badge fnt-sz-small red" data-placement="right">beta</span></div><div class="outer-border"><div class="new-format" id="new"><div class="fname msB"><i class="icon-info-circled fnt-sz-small"></i><label><!-- react-text: 13 -->Debug function<!-- /react-text --><span class="func-name">getLuckyFloorNumber</span><!-- react-text: 15 -->with your own input<!-- /react-text --></label><div id="parameters"><div class="inner-div-single"><div class="params"><label class="func-type float-left"><!-- react-text: 20 -->Integer <!-- /react-text --><span class="func-params">n</span></label></div><input type="text" class="text-width " value=""></div></div></div><br></div></div></div></div></div></div>
  3190.  
  3191. </div></div>
  3192. <small class="mlL leadingSpaceWarn hidden">
  3193. <em class="txt-atl-grey-dark warn-message"></em>
  3194. </small>
  3195.  
  3196. <div id="dllink clearfix" class="mdB mjT" style="clear:both"><a id="testcase-dl" aria-label="Download Test Cases" href="javascript:void(0);"><i class="icon--single icon-download"> Download sample test cases</i></a><small class="mlL"><em class="txt-alt-grey-dark">The input/output files have Unix line endings. Do not use Notepad to edit them on windows. </em></small></div>
  3197.  
  3198.  
  3199. <div id="runstatus" class="clear"></div>
  3200.  
  3201. </div></div>
  3202. <div class="clear"></div>
  3203.  
  3204.  
  3205. </div><!-- end container-inner -->
  3206. </div> <!-- end .container -->
  3207.  
  3208. </div></div>
  3209. <div class="webcam_box hidden"></div>
  3210. </div>
  3211. <footer class="page_footer fill-light footer" style="padding:5px; bottom:0px; position: relative;">
  3212. <div id="footer"><div class="footer">
  3213. <div class="text-center fnt-sz-mid">
  3214.  
  3215. </div>
  3216. <div class="fnt-sz-mid">
  3217. <center class="mmT mmB">
  3218. <a class="mdR mdL" href="/aboutus" target="_blank">About</a>
  3219. <a class="mdR" href="/privacy" target="_blank">Privacy Policy</a>
  3220. <a class="mdR" href="/terms-of-service" target="_blank">Terms of Service</a>
  3221. <center>
  3222. </center></center></div>
  3223.  
  3224. </div></div>
  3225. </footer>
  3226.  
  3227.  
  3228. <!-- Load Jquery -->
  3229. <script src="https://hrcdn.net/hackerrank/assets/base-6ce2506955bc38544d364c5628a7cf46.js"></script>
  3230.  
  3231. <!-- failsafe -->
  3232. <script>
  3233. if (typeof(jQuery) != "function" && !jsCookies.get("jQueryError") && (window.location.href.split("jQueryError=1").length == 1)) {
  3234. // set 10 mins cookie
  3235. var current_cdn = jsCookies.get("cdn_url");
  3236. jsCookies.set("jQueryError", 1, 0, 0, 10);
  3237. jsCookies.set("cdn_url", 1, 0, -1);
  3238.  
  3239. // reload the page
  3240. separator = (window.location.href.split("?").length > 1) ? "&" : "?";
  3241. if (navigator.appName == "Microsoft Internet Explorer") {
  3242. window.document.execCommand('Stop');
  3243. } else {
  3244. window.stop();
  3245. }
  3246. window.location.href = window.location.href + separator + "jQueryError=1&current_cdn=" + encodeURIComponent(current_cdn);
  3247.  
  3248. //stop JavaScript execution
  3249. throw new Error("StopExec");
  3250. } else {
  3251. // if it worked, remove jQueryError
  3252. if (jsCookies.get("jQueryError")) {
  3253. jsCookies.set("jQueryError", 1, 0, -1);
  3254. }
  3255. }
  3256. </script>
  3257.  
  3258.  
  3259.  
  3260. <script src="https://hrcdn.net/hackerrank/assets/candidate_libraries-8080a42c37bc1630c327552d3b40f242.js" crossorigin="anonymous"></script>
  3261. <script src="https://hrcdn.net/hackerrank/assets/candidate-67f35ced57fa753a2b64e6a7b196a714.js" crossorigin="anonymous"></script>
  3262. <script src="https://hrcdn.net/hackerrank/assets/set-manifest-1b19a88aff15602bdf034ebfe49effcf57cf6d43.js" crossorigin="anonymous"></script>
  3263. <script src="https://hrcdn.net/hackerrank/assets/codeshell/dist/codeshell-7a1a2116c68d502e0d2303e58d7de2b0.js" crossorigin="anonymous"></script>
  3264. <script src="https://hrcdn.net/hackerrank/assets/compound/recruit-candidate-8e989ccf7ccaf482fdd4b6957b152d0b.js" crossorigin="anonymous"></script>
  3265.  
  3266.  
  3267.  
  3268.  
  3269. <!-- jsCookies -->
  3270.  
  3271.  
  3272. <script type="text/javascript">
  3273. window.extern_script_delay = 0;
  3274. if (window.PRODUCT_NAMESPACE === 'hackerrank' && typeof($) === "function") {
  3275. $(window).on("load", function(){
  3276. if (('performance' in window) && ('timing' in window.performance)) {
  3277. dom_time = window.performance.timing.domInteractive - window.performance.timing.navigationStart;
  3278. if (dom_time > 12000) {
  3279. window.extern_script_delay = 3000;
  3280. } else if (dom_time > 7000) {
  3281. window.extern_script_delay = 2000;
  3282. } else if (dom_time > 6000) {
  3283. window.extern_script_delay = 1000;
  3284. }
  3285. }
  3286. });
  3287. }
  3288. </script>
  3289.  
  3290. <script>
  3291. </script>
  3292.  
  3293. <!-- Google Analytics -->
  3294. <script type="text/javascript">
  3295. $(window).on("load", function() {
  3296. setTimeout(function() {
  3297. (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
  3298. }, window.extern_script_delay);
  3299. });
  3300. </script>
  3301.  
  3302. <!-- Mixpanel -->
  3303. <script type="text/javascript">
  3304. $(window).on("load", function() {
  3305. setTimeout(function() {
  3306. (function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==
  3307. typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
  3308. mixpanel.init("bcb75af88bccc92724ac5fd79271e1ff");
  3309.  
  3310. mixpanel.identify(jsCookies.get("hackerrank_mixpanel_token"));
  3311. }, window.extern_script_delay);
  3312. });
  3313. </script>
  3314.  
  3315. <!-- auryc tracking start -->
  3316. <!-- auryc tracking end -->
  3317.  
  3318. <script type="text/javascript">
  3319. var heap = [];
  3320. var attrs = ["clearEventProperties","identify","setEventProperties","track","unsetEventProperty"];
  3321. for (var attribute in attrs) {
  3322. heap[attrs[attribute]] = function () {};
  3323. }
  3324. </script>
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331. <script type="text/javascript">
  3332. window._fbq = window._fbq || [];
  3333. </script>
  3334.  
  3335.  
  3336. <script type="text/javascript">
  3337.  
  3338. !function(obj){window.hr_metrics=obj,obj.loaded=!0,obj.config=obj.config||{},obj._b=obj._b||[],obj.init=function(options){this.config=$.extend({product:null,use_cookie:!1,uid_cookie_key:null,session_cookie_key:null,session_id:null,uid_token:null,uid_token_cookie_key:null,uid:Math.floor(1e12*(1+Math.random())).toString(16),metrics_endpoint:null,batch_track_interval:2e3},this.config||{},options||{})},obj.get_session_id=function(){return this.config.session_id?this.config.session_id:this.config.session_cookie_key?$.cookie(this.config.session_cookie_key):null},obj.get_uid_data=function(){return this.config.use_cookie?{uid:$.cookie(this.config.uid_cookie_key),uid_token:$.cookie(this.config.uid_token_cookie_key)}:{uid:this.config.uid,uid_token:this.config.uid_token}},obj.get_session_params=function(){var session_params={session_landing_url:$.cookie("session_landing_url"),session_referrer:$.cookie("session_referrer"),session_referring_domain:$.cookie("session_referring_domain")};try{var utm_params=$.cookie("session_utm_params");utm_params&&(utm_params=JSON.parse(utm_params),session_params.session_utm_source=utm_params.s,session_params.session_utm_medium=utm_params.m,session_params.session_utm_campaign=utm_params.c)}catch(e){}return session_params},obj.track=function(event_name,event_value,attrs,use_beacon){var common_attrs={session_id:this.get_session_id()},attrs=$.extend({},attrs,common_attrs,this.get_session_params()),_tracking_data=$.extend({product:this.config.product,event_name:event_name,event_value:event_value,params:attrs},this.get_uid_data());this._post_tracking_data(_tracking_data,use_beacon)},obj.batch_track=function(event_name,event_value,attrs,use_beacon){this._EVENT_ARRAY=this._EVENT_ARRAY||[];var common_attrs={session_id:this.get_session_id()},attrs=$.extend({},attrs,common_attrs),_tracking_data={event_name:event_name,event_value:event_value,params:attrs};this._EVENT_ARRAY.push({time:(new Date).getTime(),url:document.location.href,track_data:_tracking_data}),this._event_batch_track_id||(this._event_batch_track_id=window.setInterval(function(that){return function(){that.batch_track_record()}}(this),this.config.batch_track_interval))},obj.batch_track_record=function(use_beacon){if("object"==typeof this._EVENT_ARRAY&&this._EVENT_ARRAY.length>0){var _tracking_data_array=this._EVENT_ARRAY;this._EVENT_ARRAY=[];var _tracking_data=$.extend({product:this.config.product,batch_request:"true",current_time:(new Date).getTime(),data_array:JSON.stringify(_tracking_data_array),session_params:JSON.stringify(this.get_session_params())},this.get_uid_data());this._post_tracking_data(_tracking_data,use_beacon)}},obj._post_tracking_data=function(data,use_beacon){var metrics_endpoint=this.config.metrics_endpoint;if(use_beacon===!0&&"object"==typeof window.navigator&&"function"==typeof window.navigator.sendBeacon){var jsonContent="params_stream="+encodeURIComponent(JSON.stringify(data)),_json_blob=new Blob([jsonContent],{type:"application/x-www-form-urlencoded; charset=UTF-8"});window.navigator.sendBeacon(metrics_endpoint,_json_blob)}else $.ajax({type:"POST",url:metrics_endpoint,crossDomain:!0,xhrFields:{withCredentials:!0},beforeSend:function(xhr){return!0},data:data})},function(o){if(Array.isArray(o._b)){for(var i=0;i<o._b.length;i++){var e=o._b[i];o[e[0]]&&"function"==typeof o[e[0]]&&o[e[0]].apply(o,e[1])}o._b=[]}}(obj)}(window.hr_metrics||{});
  3339. //# sourceMappingURL=https://staging.hackerrank.net/assets/sourcemaps/hr_metrics-1131097901e313629148f8663b201b05.js.map
  3340.  
  3341. (function() {
  3342. hr_metrics.init({
  3343. product: 'candidate_site',
  3344. use_cookie: true,
  3345. uid_cookie_key: 'hackerrank_mixpanel_token',
  3346. uid_token_cookie_key: 'metrics_user_identifier',
  3347. session_cookie_key: 'session_id',
  3348. batch_track_interval: 15 * 1000,
  3349. metrics_endpoint: 'https://metrics.hackerrank.com/metrics'
  3350. });
  3351. })();
  3352.  
  3353. //tracking hrutm_ parameters
  3354. $(window).on("load", function() {
  3355. (function(){
  3356. var sPageURL = window.location.search.substring(1);
  3357. var sURLVariables = sPageURL.split('&');
  3358. var trackingData;
  3359. for(var i = 0; i < sURLVariables.length; i++) {
  3360. var sParameterName = sURLVariables[i].split('=');
  3361. if(sParameterName[0] == 'utm_source') {
  3362. trackingData = decodeURIComponent(escape(sParameterName[1]));
  3363. hr_metrics.track(trackingData.event_name, trackingData)
  3364. } else if (sParameterName[0] == 'ad-campaign' && sParameterName[1]=='Mkt1010415') {
  3365. if(typeof HR !== "undefined" && HR !== null && (!HR.PREFETCH_DATA.profile || !HR.PREFETCH_DATA.profile.created_at)){
  3366. document.cookie = "fb_ad_campaign_source="+sParameterName[1]+";path=/";
  3367. }
  3368. }
  3369. }
  3370. })();
  3371.  
  3372. if(typeof HR !== "undefined" && HR !== null && HR.PREFETCH_DATA && HR.PREFETCH_DATA.profile && HR.PREFETCH_DATA.profile.created_at) {
  3373. if($.cookie('fb_ad_campaign_source')) {
  3374. window._fbq.push(['track', '6023409928156', {'value':'0.01','currency':'USD'}]);
  3375. $.removeCookie('fb_ad_campaign_source', { path: '/' });
  3376. }
  3377. }
  3378. });
  3379. </script>
  3380.  
  3381.  
  3382.  
  3383.  
  3384. <!-- Some Black Magic for Internet Explorer -->
  3385.  
  3386. <!--[if lt IE 10]>
  3387. <script src="https://hrcdn.net/hackerrank/assets/jquery-plugins/jQuery.XDomainRequest-0396dde87dacd6a2b8e29f6c8275d5fc.js"></script>
  3388. <![endif]-->
  3389.  
  3390. <!--[if lt IE 9]>
  3391. <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6/html5shiv.min.js" type="text/javascript"></script>
  3392. <![endif]-->
  3393.  
  3394. <!-- Chrome Frame for IE6 -->
  3395. <!--[if lt IE 7 ]>
  3396. <script src="https://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script><script>window.attachEvent("onload",function(){CFInstall.check({mode:"overlay"})})</script>
  3397. <![endif]-->
  3398.  
  3399. <!--[if lte IE 9]>
  3400. <script>
  3401. IE_BROWSER = true
  3402. </script>
  3403. <![endif]-->
  3404.  
  3405. <!-- Track button clicks -->
  3406. <script type="text/javascript">
  3407. $(document).on('click', 'a, button, input, select, i', null, function(e) {
  3408. var src = e.currentTarget, $src = $(e.currentTarget);
  3409. if ($src.attr('data-analytics')) {
  3410. action = 'Click'; data = $src.attr('data-analytics');
  3411. } else {
  3412. return;
  3413. }
  3414.  
  3415. hr_metrics.track(action, data, (function() {
  3416. var params={};
  3417. for (var _i=1; _i<=12; ++_i){
  3418. var _attr = 'data-attr'+_i;
  3419. if ($src.attr(_attr)){
  3420. params['attribute'+_i] = $src.attr(_attr);
  3421. }}
  3422. var attributes = src.attributes, attr_length = src.attributes.length;
  3423. for (var i = 0; i < attr_length; i++){
  3424. var attribute = attributes[i];
  3425. if (attribute.name.indexOf('data-attr-') === 0){
  3426. param_name = attribute.name.substr('data-attr-'.length);
  3427. if (param_name.length > 0) {
  3428. params[param_name] = attribute.value;
  3429. }
  3430. }
  3431. }
  3432. return params;
  3433. })());
  3434. // google analytics
  3435. _gaq.push(['_trackEvent', 'Events' , action, data])
  3436. });
  3437.  
  3438. $(document).on('AnalyticsEvent', function(e) {
  3439. action = e.event_type || false
  3440. data = e.event_name || false
  3441.  
  3442. if (!action || !data)
  3443. return
  3444.  
  3445. params = {}
  3446. params['attribute1'] = e.event_value || ""
  3447.  
  3448. if (window.HR && window.HR.current_page)
  3449. params['attribute2'] = window.HR.current_page
  3450.  
  3451. if (window.HR && window.HR.current_contest)
  3452. params['attribute3'] = window.HR.current_contest.get('name')
  3453.  
  3454. // google analytics
  3455. _gaq.push(['_trackEvent', 'Events' , action, data])
  3456. });
  3457. </script>
  3458.  
  3459.  
  3460. <!-- Google Tag Manager (noscript) -->
  3461. <noscript>&lt;iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PKNP883"
  3462. height="0" width="0" style="display:none;visibility:hidden"&gt;&lt;/iframe&gt;</noscript>
  3463. <!-- End Google Tag Manager (noscript) -->
  3464.  
  3465.  
  3466. <div class="offline-ui offline-ui-up"><div class="offline-ui-content"></div><a href="" class="offline-ui-retry"></a></div><script type="text/javascript" id="">_linkedin_data_partner_id="47770";</script><script type="text/javascript" id="">(function(){var b=document.getElementsByTagName("script")[0],a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src="https://snap.licdn.com/li.lms-analytics/insight.min.js";b.parentNode.insertBefore(a,b)})();</script>
  3467. <noscript>
  3468. &lt;img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=47770&amp;amp;fmt=gif"&gt;
  3469. </noscript>
  3470. <script type="text/javascript" id="">!function(b,e,f,g,a,c,d){b.fbq||(a=b.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},b._fbq||(b._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.queue=[],c=e.createElement(f),c.async=!0,c.src=g,d=e.getElementsByTagName(f)[0],d.parentNode.insertBefore(c,d))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");fbq("init","265287730544127");fbq("track","PageView");</script>
  3471. <noscript>&lt;img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=265287730544127&amp;amp;ev=PageView&amp;amp;noscript=1"&gt;</noscript>
  3472.  
  3473.  
  3474.  
  3475. <script type="text/javascript" id="">!function(d,e,f,a,b,c){d.twq||(a=d.twq=function(){a.exe?a.exe.apply(a,arguments):a.queue.push(arguments)},a.version="1.1",a.queue=[],b=e.createElement(f),b.async=!0,b.src="//static.ads-twitter.com/uwt.js",c=e.getElementsByTagName(f)[0],c.parentNode.insertBefore(b,c))}(window,document,"script");twq("init","nxpu7");twq("track","PageView");</script>
  3476. <script type="text/javascript" id="">window.heap=window.heap||[];
  3477. heap.load=function(e,d){window.heap.appid=e;window.heap.config=d=d||{};var a=d.forceSSL||"https:"===document.location.protocol,b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=(a?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a);b=function(a){return function(){heap.push([a].concat(Array.prototype.slice.call(arguments,0)))}};a="addEventProperties addUserProperties clearEventProperties identify removeEventProperty setEventProperties track unsetEventProperty".split(" ");for(var c=
  3478. 0;c<a.length;c++)heap[a[c]]=b(a[c])};heap.load("698647726");</script><img src="https://tracking.g2crowd.com/attribution_tracking/conversions/923.gif?e="><script type="text/javascript" id="">(function(a,b,c,d,e){a=b.createElement(c);b=b.getElementsByTagName(c)[0];a.async=1;a.id=e;a.src=d;b.parentNode.insertBefore(a,b)})(window,document,"script","https://scripts.demandbase.com/627a2f63.min.js","demandbase_js_lib");</script><iframe name="_hjRemoteVarsFrame" title="_hjRemoteVarsFrame" id="_hjRemoteVarsFrame" src="https://vars.hotjar.com/rcj-99d43ead6bdf30da8ed5ffcb4f17100c.html" style="display: none !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important;"></iframe><div id="ads"></div><script src="https://px.ads.linkedin.com/collect/?time=1519923830800&amp;pid=47770&amp;url=https%3A%2F%2Fwww.hackerrank.com%2Ftests%2Fcql427eis7a%2Flogin%3Fb%3DeyJ1c2VybmFtZSI6Im1hcmlvX2RlYmVzQGxpdmUuY29tIiwicGFzc3dvcmQiOiJiNWYzYTdiZiIsImhpZGUiOnRydWV9&amp;pageUrl=https%3A%2F%2Fwww.hackerrank.com%2Ftests%2Fcql427eis7a%2Flogin%3Fb%3DeyJ1c2VybmFtZSI6Im1hcmlvX2RlYmVzQGxpdmUuY29tIiwicGFzc3dvcmQiOiJiNWYzYTdiZiIsImhpZGUiOnRydWV9&amp;ref=https%3A%2F%2Foutlook.live.com%2F&amp;fmt=js&amp;s=1" type="text/javascript"></script><script src="https://analytics.twitter.com/i/adsct?p_id=Twitter&amp;p_user_id=0&amp;txn_id=nxpu7&amp;events=%5B%5B%22pageview%22%2Cnull%5D%5D&amp;tw_sale_amount=0&amp;tw_order_quantity=0&amp;tw_iframe_status=0&amp;tpx_cb=twttr.conversion.loadPixels&amp;tw_document_href=https%3A%2F%2Fwww.hackerrank.com%2Ftests%2Fcql427eis7a%2Fredirect" type="text/javascript"></script></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement