All Posts107 [2019.02.13] Day of the Programmer Problem Marie invented a Time Machine and wants to test it by time-traveling to visit Russia on the Day of the Programmer (the day of the year) during a year in the inclusive range from to .From to , Russia's official calendar was the Julian calendar; since they used the Gregorian calendar system. The transition from the Julian to Gregorian calendar system occurred in , when the next day after J.. 2019. 2. 13. [2019.02.12] Migratory Birds Problem You have been asked to help study the population of birds migrating across the continent. Each type of bird you are interested in will be identified by an integer value. Each time a particular kind of bird is spotted, its id number will be added to your array of sightings. You would like to be able to find out which type of bird is most common given a list of sightings. Your task is to p.. 2019. 2. 12. [JavaScript공부 - 10] Interaction(상호작용):alert, prompt. comfirm alert구조 : 1alert(message);cs alert구문은 메세지를 보여주며 사용자가 "OK/확인"을 누르기 전까지 스크립트의 실행을 잠시 멈춤. 1alert("Hello");cs이 메세지를 띄우는 작은 윈도우 창을 modal window라고 부름. "modal"이라는 단어의 뜻은 사이트의 방문자가 윈도우창을 조작하기 전까지 다른 버튼을 누르거나 다른 페이지와 어떠한 작용을 할 수 없다는 뜻임. 즉, 사용자가 OK라는 버튼을 누를 때 까지 다른 스크립트들은 멈춰 있음 prompt prompt 함수는 두 개의 인자를 받음. 1result = prompt(title[, default]);cs prompt 함수 또한 텍스트 메세지와 함께 모달 윈도우 창을 띄우는데 사용자를 위한 인풋 영역과 OK/CA.. 2019. 2. 11. [2019.02.11] Divisible Sum Pairs Problem You are given an array of integers, , and a positive integer, . Find and print the number of pairs where and + is divisible by .For example, and . Our three pairs meeting the criteria are and .Function DescriptionComplete the divisibleSumPairs function in the editor below. It should return the integer count of pairs meeting the criteria.divisibleSumPairs has the following parameter(s):n:.. 2019. 2. 11. [2019.02.08] Birthday Chocolate Problem Lily has a chocolate bar that she wants to share it with Ron for his birthday. Each of the squares has an integer on it. She decides to share a contiguous segment of the bar selected such that the length of the segment matches Ron's birth month and the sum of the integers on the squares is equal to his birth day. You must determine how many ways she can divide the chocolate.Consider the .. 2019. 2. 8. [JavaScript공부 - 9] Comparisons(비교) 학창시절에 수학 교과에서 비교를 하는 문법을 많이 봤음. * 큼 / 작음 : a > b, a = b, a 1은 올바른 식이기 때문에 true를 반환하며 2 == 1은 2와 1이 같은 값이 아니기 때문에 옳지 않은 비교라 false를 반환함. 123alert ( 2 > 1); // truealert ( 2 == 1); // falsealert ( 2 != 1); // truecs 비교의 결과는 다른 값들과 마찬가지로 변수에 할당될 수 있음! 12let result = 5 > 4; // result = truealert(result); // truecs String(문자열)의 비교 한 문자열과 다른 문자열을 크기를 비교하는 기준은 자바스크립트에서는 사전 또는 사.. 2019. 2. 1. [2019.02.01] Breaking the Records Problem Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game establish her record for the season, and she begins counting from there.For example, assume her scores for the season are represented in the array . Sc.. 2019. 2. 1. [2019.01.31] Between Two Sets Problem You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions:The elements of the first array are all factors of the integer being consideredThe integer being considered is a factor of all elements of the second arrayThese numbers are referred to as being between the two arrays. You must determine how many such numbers exist.For ex.. 2019. 1. 31. [JavaScript공부 - 8] Operators(연산자) 초등학교 때부터 수학을 배우면서 다양한 연산자를 접할 수 있었음. 연산자에는 더하기(+), 빼기(-), 곱하기(*) 등과 같은 것들이 있음. 이번 포스팅에서는 학교 수학시간에 다루지 않았던 연산자의 면에 집중해서 해볼 예정. 용어 : "unary(단항)", "binary(이항)", "operand(피연산자)" 일단 연산자에 들어가기 전에 용어에 대해 정의를 하고 넘어갈 예정. ◉ operand(피연산자) : 피연산자는 연산을 하는 대상을 의미함. 예를 들어 5 * 2 와 같은 연산을 할 때, 2개의 피연산자가 존재함. 이 연산에서 왼쪽 피연산자는 5가 될 것이고 오른쪽 피연산자는 2가 될 것임. 가끔 사람들은 피연산자 대신에 argument라고 부름 ◉ 연산이 unary(단항)이라는 의미는 피연산자가 하.. 2019. 1. 30. 이전 1 ··· 3 4 5 6 7 8 9 ··· 12 다음