codeeval
CHALLENGE DESCRIPTION: You are given a number N and a pattern. The pattern consists of lowercase latin letters and one operation "+" or "-". The challenge is to split the number and evaluate it according to this pattern e.g. 1232 ab+cd -> …
美しくない。 CHALLENGE DESCRIPTION: Assume that someone dictates you a sequence of numbers and you need to write it down. For brevity, he dictates it as follows: first says the number of consecutive identical numbers and then says the numb…
CHALLENGE DESCRIPTION: You've decided to make a road trip across the country in a straight line. You have chosen the direction you'd like to travel and made a list of cities in that direction that have gas stations to stop at and fill up y…
CHALLENGE DESCRIPTION: In this challenge you're given a random string containing hidden and visible digits. The digits are hidden behind lower case latin letters as follows: 0 is behind 'a', 1 is behind ' b ' etc., 9 is behind 'j'. Any oth…
CHALLENGE DESCRIPTION: You have received a text encoded with Morse code and want to decode it. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the following: .- ...- ..--- .-- .... .. .…
CHALLENGE DESCRIPTION: You have a string of words and digits divided by comma. Write a program which separates words with digits. You shouldn't change the order elements. INPUT SAMPLE: Your program should accept as its first argument a pat…
CHALLENGE DESCRIPTION: You have 2 lists of positive integers. Write a program which multiplies corresponding elements in these lists. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the…
CHALLENGE DESCRIPTION: You are given a list of numbers which is supplemented with positions that have to be swapped. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the following 1 2 3 …
CHALLENGE DESCRIPTION: In this challenge you need to find the longest word in a sentence. If the sentence has more than one word of the same length you should pick the first one. INPUT SAMPLE: Your program should accept as its first argume…
CHALLENGE DESCRIPTION: Write a program to determine the shortest repetition in a string. A string is said to have period p if it can be formed by concatenating one or more repetitions of another string of length p. For example, the string …
CHALLENGE DESCRIPTION: Many persons are familiar with the Roman numerals for relatively small numbers. The symbols I (capital i), V, X, L, C, D, and M represent the decimal values 1, 5, 10, 50, 100, 500 and 1000 respectively. To represent …
CHALLENGE DESCRIPTION: Having a string representation of a set of numbers you need to print this numbers. All numbers are separated by semicolon. There are up to 20 numbers in one line. The numbers are "zero" to "nine" INPUT SAMPLE: Your p…
CHALLENGE DESCRIPTION: here is a game where each player picks a number from 1 to 9, writes it on a paper and gives to a guide. A player wins if his number is the lowest unique. We may have 10-20 players in our game. INPUT SAMPLE: Your prog…
CHALLENGE DESCRIPTION: You have JSON string which describes a menu. Calculate the SUM of IDs of all "items" in the case a "label" exists for an item. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Inpu…
CHALLENGE DESCRIPTION: Write a program which checks input numbers and determines whether a number is even or not. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the following 701 4123 …
CHALLENGE DESCRIPTION: You have coordinates of 2 points and need to find the distance between them. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the following (25, 4) (1, -6) (47, 43…
西村京太郎先生は海外でも有名なんですね。 CHALLENGE DESCRIPTION: You have a set of rows with names of famous writers encoded inside. Each row is divided into 2 parts by pipe char (|). The first part has a writer's name. The second part is a…
CHALLENGE DESCRIPTION: Write a program which swaps letters' case in a sentence. All non-letter characters should remain the same. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the fol…
CHALLENGE DESCRIPTION: Write a program which capitalizes the first letter of each word in a sentence. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the following Hello world javaScrip…
CHALLENGE DESCRIPTION: Write a program which finds the next-to-last word in a string. INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Input example is the following some line with text another line Each…
20141118 追記 floatの結果を下3桁で表示するというを見落としていた。。。 ソートのアルゴリズムを問う問題じゃなかった。すごい勘違いしてた。 simple sortなので挿入ソートか選択ソートのことだと思うのですが、 codeevalで採点するとスコアが低いです。…
CHALLENGE DESCRIPTION: There is a board (matrix). Every cell of the board contains one integer, which is 0 initially. The next operations can be applied to the Query Board: SetRow i x: it means that all values in the cells on row "i" have …
ちょっと難しくなりました。 CHALLENGE DESCRIPTION: Credits: This problem appeared in the Facebook Hacker Cup 2013 Hackathon. When John was a little kid he didn't have much to do. There was no internet, no Facebook, and no programs to hack o…
CHALLENGE DESCRIPTION: You will be given a hexadecimal (base 16) number. Convert it into decimal (base 10). INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Each line in this file contains a hex number. …
CHALLENGE DESCRIPTION: Given two integers N and M, calculate N Mod M (without using any inbuilt modulus operator). INPUT SAMPLE: Your program should accept as its first argument a path to a filename. Each line in this file contains two com…
こういう数値のことをArmstrong Numbersっていうんですね。 CHALLENGE DESCRIPTION: An Armstrong number is an n-digit number that is equal to the sum of the n'th powers of its digits. Determine if the input numbers are Armstrong numbers. INPUT …
CodeEval 少し手こずりました。 CHALLENGE DESCRIPTION: You're building a new social platform and you want to store user's working experience. You've decided to calculate the total experience in years for each user based on the time periods e…
CHALLENGE DESCRIPTION Your friends decided to make a fun of you. They've installed a script to your computer which shuffled all of the words within a text. It was a joke, so they've left hints for each sentence which allow you to easily re…
Your goal is to find the percentage ratio of lowercase and uppercase letters in line below. INPUT SAMPLE Your program should accept as its first argument a path to a filename. Each line of input contains a string with uppercase and lowerca…
CHALLENGE DESCRIPTION In this challenge you will be dealing with zero based numbers. A zero based number is set in the following form: "flag" "sequence of zeroes" "flag" "sequence of zeroes" etc. Separated by a single space. 00 0 0 00 00 0…