最新 最热

ACMSGURU 403 - Scientific Problem

Once upon a time Professor Idioticideasinventor was travelling by train. Watching cheerless landscape outside the window, he decided to invent the theme of his ...

2021-08-11
1

ACMSGURU 460 - Plural Form of Nouns

In the English language, nouns are inflected by grammatical number - that is singular or plural. In this problem we use a simple model of constructing plural fr...

2021-08-11
1

ACMSGURU 102 - Coprimes

For given integer N (1<=N<=10^4) find amount of positive numbers not greater than N that coprime with N. Let us call two positive integers (say, A and B, for ex...

2021-08-11
1

LeetCode 0626 - Exchange Seats

Mary is a teacher in a middle school and she has a table seat storing students’ names and their corresponding seat ids.

2021-08-11
1

LeetCode 1117 - Building H2O

There are two kinds of threads, oxygen and hydrogen. Your goal is to group these threads to form water molecules. There is a barrier where each thread has to wa...

2021-08-11
1

ACMSGURU 118 - Digital Root

Let f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherwise digital root of n is equal to digi...

2021-08-11
1

ACMSGURU 106 - The equation

There is an equation ax + by + c = 0. Given a,b,c,x1,x2,y1,y2 you must determine, how many integer roots of this equation are satisfy to the following condition...

2021-08-11
1

ACMSGURU 107 - 987654321 problem

For given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to 987654321.

2021-08-11
1

ACMSGURU 551 - Preparing Problem

It is not easy to prepare a problem for a programming contest. Petya and Vasya decided that problem “A+B” needs at least n distinct solutions to be written. It ...

2021-08-11
1

ACMSGURU 115 - Calendar

First year of new millenium is gone away. In commemoration of it write a program that finds the name of the day of the week for any date in 2001.

2021-08-11
1