Problem description An elephant decided to visit his friend. It turned out that the elephant's house is located at point 0 and his friend's house is located at point x(x > 0) of the coordinate line. In one step the elephant can move 1, 2, 3, 4 or 5 p…
题意: 有一种个位数与最高位数字相等的数字,求在l,r的范围内,这样的数字的个数. 思路: 找下规律就知道当当n>10的时候除去个位以后的答案等于n/10,然后考虑第一个数字是否小于最后一个.小于减一,还要加上个位一定存在的9位数 import java.util.Scanner; public class xxz { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long l = sc…
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 19356 Accepted: 7412 Special Judge Description The game "The Pilots Brothers: following the stripy elephant" has a quest where a player needs to o…
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15564 Accepted Submission(s): 6405 Problem Description There is a pile of n wooden sticks. The length and weight of each stick a…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784 Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the shi…