Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Missing Numbers Problem Code: MISS_NUM | CodeChef Solution | Python3

  • Python Coder
  • 2022-03-26
  • 3927
Missing Numbers Problem Code: MISS_NUM | CodeChef Solution | Python3
  • ok logo

Скачать Missing Numbers Problem Code: MISS_NUM | CodeChef Solution | Python3 бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Missing Numbers Problem Code: MISS_NUM | CodeChef Solution | Python3 или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Missing Numbers Problem Code: MISS_NUM | CodeChef Solution | Python3 бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Missing Numbers Problem Code: MISS_NUM | CodeChef Solution | Python3

Alice (uniformly and independently) randomly picks two integers a,b from the range [1,104], and writes down the values of a+b, a−b, a⋅b and ⌊ab⌋ (integer division) in some random order. Unfortunately, she forgot the values of a and b. You need to help her to find out if there exists two integers a,b such that 1≤a,b≤104 and a+b, a−b, a⋅b, ⌊ab⌋ are the numbers she has written down.

If a solution exists, it is guaranteed to be unique.

Input Format
The first line of input contains a single integer T, denoting the number of testcases. The description of T testcases follows.
Each testcase consists of a single line of input, containing four space-separated integers A,B,C,D — the values written down by Alice. It is guaranteed that at most one of the four numbers A,B,C,D will be negative.
Output Format
For each testcase, output in a single line, separated by a space, the two numbers Alice has chosen in order (i.e, if the solution is a=1 and b=2, print 1 2 and not 2 1). If there does not exist any such choice of integers, print −1 twice, separated by a space, instead.
Constraints
1≤T≤105
−109≤A,B,C,D≤109
At most one of A,B,C,D is negative.
Subtasks
Subtask #1 (100 points): Original constraints

Sample Input 1
2
-1 72 0 17
1 4 5 6
Sample Output 1
8 9
-1 -1
Explanation
Test case 1: With a=8,b=9 we obtain 8+9=17,8−9=−1,8⋅9=72,⌊89⌋=0 which are exactly the 4 numbers written down by Alice.

Test case 2: It can be shown that no choice of integers a,b can produce the given 4 numbers.

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]