摘要:
If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver 阅读全文
摘要:
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文
摘要:
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
摘要:
如果你是哈利·波特迷,你会知道魔法世界有它自己的货币系统 —— 就如海格告诉哈利的:“十七个银西可(Sickle)兑一个加隆(Galleon),二十九个纳特(Knut)兑一个西可,很容易。”现在,给定哈利应付的价钱P和他实付的钱A,你的任务是写一个程序来计算他应该被找的零钱。 输入格式: 输入在1行 阅读全文
摘要:
Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: That is 阅读全文
摘要:
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra 阅读全文