Given a positive odd integer K and two positive integers low and high, determine how many integers between low and high contain exactly K divisors. Input The first line of the input contains a positive integer C (0<C<100,000), the number of test cas…
Given an integer N, you have to print the sum of odd numbers and even numbers form 1 to N Input:First line consists of T test cases. First line of every test case consists of a Single integer N. Output:Single line output, with sum of odd numbers and…
A. Home Numbers 题目连接: http://www.codeforces.com/contest/638/problem/A Description The main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with od…
题目描述 Bessie's cruel second grade teacher has assigned a list of N (1 <= N <= 100) positive integers I (1 <= I <= 10^60) for which Bessie must determine their parity (explained in second grade as 'Even... or odd?'). Bessie is overwhelmed by the…
Odd Personality Time Limit: 2000ms Memory Limit: 32768KB This problem will be judged on LightOJ. Original ID: 130064-bit integer IO format: %lld Java class name: Main Being an odd person, Jim always liked odd numbers. One day he was visiting his…
Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices where indices[i] = [ri, ci]. For each pair of [ri, ci] you have to increment all cells in row ri and column ci by 1. Return the number of cells with od…
题目如下: Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices where indices[i] = [ri, ci]. For each pair of [ri, ci] you have to increment all cells in row ri and column ci by 1. Return the number of cells w…
题目描述 Bessie's cruel second grade teacher has assigned a list of N (1 <= N <= 100) positive integers I (1 <= I <= 10^60) for which Bessie must determine their parity (explained in second grade as 'Even... or odd?'). Bessie is overwhelmed by the…
There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it's off or turning off if it's on). For the ith round, you toggle every i…