2014-07-19から1日間の記事一覧

BEAUTIFUL STRINGS(CodeEval)

ちょっと難しくなりました。 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…

HEX TO DECIMAL(CodeEval)

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. …

N MOD M(CodeEval)

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(CodeEval)

こういう数値のことを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 …