最新 最热

LeetCode 0352 - Data Stream as Disjoint Intervals

Given a data stream input of non-negative integers a1, a2, …, an, …, summarize the numbers seen so far as a list of disjoint intervals.

2021-08-11
1

LeetCode 0324 - Wiggle Sort II

Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]….

2021-08-11
1

ACMSGURU 499 - Greatest Greatest Common Divisor

Andrew has just made a breakthrough in sociology: he realized how to predict whether two persons will be good friends or not. It turns out that each person has ...

2021-08-11
1

ACMSGURU 231 - Prime Sum

Find all pairs of prime numbers (A, B) such that A<=B and their sum is also a prime number and does not exceed N.

2021-08-11
1

ACMSGURU 154 - Factorial

You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 12…*N. For example, 5! = 1...

2021-08-11
1

ACMSGURU 113 - Nearly prime numbers

Nearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that given number is equal to P1*P2. There is given a s...

2021-08-11
1

ACMSGURU 100 - A+B

Read integers A and B from input file and write their sum in output file.

2021-08-11
1

ACMSGURU 123 - The sum

The Fibonacci sequence of numbers is known: F1 = 1; F2 = 1; Fn+1 = Fn + Fn-1, for n>1. You have to find S - the sum of the first K Fibonacci numbers.

2021-08-11
1

ACMSGURU 105 - Div 3

There is sequence 1, 12, 123, 1234, …, 12345678910, … . Given first N elements of that sequence. You must determine amount of numbers in it that are divisible b...

2021-08-11
0

ACMSGURU 112 - a^b-b^a

You are given natural numbers a and b. Find a^b-b^a.

2021-08-11
1