Kotlin Heroes: Episode 1

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1170 Kotlin Heroes: Episode 1 FINISHED False 9000 178125863 May 28, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1492 ) A Three Integers Again PROGRAMMING *special math

B"We have three positive integers a , b and c . You don't know their values, but you know some information about them. Consider all three pairwise sums, i.e. the numbers a+b , a+c and b+c . You know exactly two (any) of three pairwise sums. Your task is to find such three positive integers a , b and c which match the given information. It means that if you consider a+b , a+c and b+c , two out of all three of them are given in the input. Among all such triples, you must choose one with the minimum possible sum a+b+c , and among all triples with the minimum sum, you can print any. You have to process q independent queries. The first line of the input contains one integer q ( 1 <= q <= 1000 ) -- the number of queries. The next q lines contain queries. Each query is given as two integers x and y ( 2 <= x, y <= 2 cdot 10^9 ), where x and y are any two out of the three numbers a+b , a+c and b+c . For each query print the answer to it: three positive integers a , b and c consistent with the given information. Among all such triples, you have to choose one with the minimum possible sum a+b+c . Among all triples with the minimum sum, you can print any. "...

Tutorials

Kotlin Heroes Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55610802 ReaLNero1 A June 16, 2019, 5:35 a.m. OK Kotlin TESTS 5 108 0
55300238 div24ever A June 8, 2019, 11:43 a.m. OK Kotlin TESTS 5 108 0
54765549 praveenojha33 A May 28, 2019, 5 p.m. OK Kotlin TESTS 5 108 0
54756057 brainail A May 28, 2019, 2:49 p.m. OK Kotlin TESTS 5 108 0
54755228 DeadPillow A May 28, 2019, 2:39 p.m. OK Kotlin TESTS 5 108 0
55300151 div24ever A June 8, 2019, 11:41 a.m. OK Kotlin TESTS 5 109 0
55007801 Jamb0t A June 3, 2019, 8:31 a.m. OK Kotlin TESTS 5 109 0
54803078 sarthakmanna A May 29, 2019, 12:49 p.m. OK Kotlin TESTS 5 109 0
54780463 guillermo_sz A May 28, 2019, 9:08 p.m. OK Kotlin TESTS 5 109 0
54760782 ahmat A May 28, 2019, 3:47 p.m. OK Kotlin TESTS 5 109 0

remove filters

Back to search problems