Educational Codeforces Round 104 (Rated for Div. 2)

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
1487 Educational Codeforces Round 104 (Rated for Div. 2) FINISHED False 7200 123953111 Feb. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18621 ) D Pythagorean Triples PROGRAMMING binary search math number theory

B"A Pythagorean triple is a triple of integer numbers (a, b, c) such that it is possible to form a right triangle with the lengths of the first cathetus, the second cathetus and the hypotenuse equal to a , b and c , respectively. An example of the Pythagorean triple is (3, 4, 5) . Vasya studies the properties of right triangles, and he uses a formula that determines if some triple of integers is Pythagorean. Unfortunately, he has forgotten the exact formula; he remembers only that the formula was some equation with squares. So, he came up with the following formula: c = a^2 - b . Obviously, this is not the right formula to check if a triple of numbers is Pythagorean. But, to Vasya's surprise, it actually worked on the triple (3, 4, 5) : 5 = 3^2 - 4 , so, according to Vasya's formula, it is a Pythagorean triple. When Vasya found the right formula (and understood that his formula is wrong), he wondered: how many are there triples of integers (a, b, c) with 1 <= a <= b <= c <= n such that they are Pythagorean both according to his formula and the real definition? He asked you to count these triples. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of one line containing one integer n ( 1 <= n <= 10^9 ). For each test case, print one integer -- the number of triples of integers (a, b, c) with 1 <= a <= b <= c <= n such that they are Pythagorean according both to the real definition and to the formula Vasya came up with. The only Pythagorean triple satisfying c = a^2 - b with 1 <= a <= b <= c <= 9 is (3, 4, 5) ; that's why the answer for n = 3 is 0 , and the answer for n = 6 (and for n = 9 ) is 1 . "...

Tutorials

87873

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
107482970 hardik_gupta D Feb. 15, 2021, 6:45 p.m. OK GNU C11 TESTS 13 46 0
107481211 venika D Feb. 15, 2021, 6:17 p.m. OK GNU C11 TESTS 13 61 0
107484586 rainboy D Feb. 15, 2021, 7:13 p.m. OK GNU C11 TESTS 13 61 0
107478724 kaar07 D Feb. 15, 2021, 5:42 p.m. OK GNU C11 TESTS 13 61 0
107473180 sam_28 D Feb. 15, 2021, 4:49 p.m. OK GNU C11 TESTS 13 62 0
107467543 Crab_Dave D Feb. 15, 2021, 4:30 p.m. OK GNU C++11 TESTS 13 15 0
107466680 laduiw D Feb. 15, 2021, 4:29 p.m. OK GNU C++11 TESTS 13 15 0
107465303 Shadow_Pikachu D Feb. 15, 2021, 4:26 p.m. OK GNU C++11 TESTS 13 15 0
107464542 bear_xin D Feb. 15, 2021, 4:25 p.m. OK GNU C++11 TESTS 13 15 0
107497372 tan900 D Feb. 16, 2021, 3:11 a.m. OK GNU C++11 TESTS 17 15 0
107496493 hnust_zhouzisheng D Feb. 16, 2021, 2:40 a.m. OK GNU C++11 TESTS 17 15 0
107496239 kyriezzx D Feb. 16, 2021, 2:31 a.m. OK GNU C++11 TESTS 17 15 0
107493691 Qassim D Feb. 16, 2021, 12:21 a.m. OK GNU C++11 TESTS 17 15 0
107493418 Qassim D Feb. 16, 2021, 12:01 a.m. OK GNU C++11 TESTS 17 15 0
107464627 Love_Jacques D Feb. 15, 2021, 4:25 p.m. OK GNU C++11 TESTS 13 15 409600
107467190 uranium7 D Feb. 15, 2021, 4:30 p.m. OK GNU C++14 TESTS 13 15 0
107479851 1234five D Feb. 15, 2021, 5:56 p.m. OK GNU C++14 TESTS 13 15 409600
107473407 selenophile D Feb. 15, 2021, 4:50 p.m. OK GNU C++14 TESTS 13 30 0
107472098 RedShift D Feb. 15, 2021, 4:42 p.m. OK GNU C++14 TESTS 13 30 0
107471440 dipanshugarg D Feb. 15, 2021, 4:40 p.m. OK GNU C++14 TESTS 13 30 0
107481425 SASMIT_SHUBHAM D Feb. 15, 2021, 6:20 p.m. OK GNU C++14 TESTS 13 30 0
107477635 ashutosh_99 D Feb. 15, 2021, 5:28 p.m. OK GNU C++14 TESTS 13 30 0
107474532 harshitjha06 D Feb. 15, 2021, 4:58 p.m. OK GNU C++14 TESTS 13 30 0
107497309 all0fme D Feb. 16, 2021, 3:10 a.m. OK GNU C++14 TESTS 17 30 0
107489625 jersyguy D Feb. 15, 2021, 9:11 p.m. OK GNU C++14 TESTS 13 30 0
107465128 alksjhdgf D Feb. 15, 2021, 4:26 p.m. OK GNU C++17 TESTS 13 15 0
107470412 Maillew D Feb. 15, 2021, 4:34 p.m. OK GNU C++17 TESTS 13 15 0
107499765 swapnalshahil D Feb. 16, 2021, 4:22 a.m. OK GNU C++17 TESTS 17 30 0
107499090 adityakumarsinha03 D Feb. 16, 2021, 4:05 a.m. OK GNU C++17 TESTS 17 30 0
107495102 tmstrixx D Feb. 16, 2021, 1:41 a.m. OK GNU C++17 TESTS 17 30 0
107491122 kirjuri D Feb. 15, 2021, 10:04 p.m. OK GNU C++17 TESTS 13 30 0
107488905 Mardon_Khodjaev D Feb. 15, 2021, 8:49 p.m. OK GNU C++17 TESTS 13 30 0
107488440 jli505 D Feb. 15, 2021, 8:36 p.m. OK GNU C++17 TESTS 13 30 0
107486530 krea7or D Feb. 15, 2021, 7:52 p.m. OK GNU C++17 TESTS 13 30 0
107479478 shivin_dass D Feb. 15, 2021, 5:52 p.m. OK GNU C++17 TESTS 13 30 0
107469882 ultimate_pal D Feb. 15, 2021, 4:34 p.m. OK GNU C++17 (64) TESTS 13 15 0
107474546 T_Nady D Feb. 15, 2021, 4:58 p.m. OK GNU C++17 (64) TESTS 13 15 0
107474087 marksman_ D Feb. 15, 2021, 4:55 p.m. OK GNU C++17 (64) TESTS 13 15 0
107473901 taruntk D Feb. 15, 2021, 4:54 p.m. OK GNU C++17 (64) TESTS 13 15 0
107469493 AMO5 D Feb. 15, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 13 15 512000
107486972 Anish1712 D Feb. 15, 2021, 8:02 p.m. OK GNU C++17 (64) TESTS 13 15 512000
107472953 kitsune D Feb. 15, 2021, 4:47 p.m. OK GNU C++17 (64) TESTS 13 15 1638400
107490403 ale_naser_pastoriza D Feb. 15, 2021, 9:37 p.m. OK GNU C++17 (64) TESTS 13 30 0
107498886 Akhil_Rautela D Feb. 16, 2021, 3:59 a.m. OK GNU C++17 (64) TESTS 17 30 0
107501732 Prakhar6969 D Feb. 16, 2021, 5:07 a.m. OK GNU C++17 (64) TESTS 17 30 0
107478021 sersht D Feb. 15, 2021, 5:33 p.m. OK Go TESTS 13 46 204800
107475778 Airflow D Feb. 15, 2021, 5:09 p.m. OK Haskell TESTS 13 31 102400
107480266 _Kee D Feb. 15, 2021, 6:03 p.m. OK Haskell TESTS 13 46 102400
107480036 Relief D Feb. 15, 2021, 5:59 p.m. OK Java 11 TESTS 13 186 0
107479308 mennafadali D Feb. 15, 2021, 5:49 p.m. OK Java 11 TESTS 13 187 0
107478784 Pursuit_of_Accepted D Feb. 15, 2021, 5:43 p.m. OK Java 11 TESTS 13 187 0
107473157 Ste D Feb. 15, 2021, 4:49 p.m. OK Java 11 TESTS 13 187 0
107501145 namitnayan D Feb. 16, 2021, 4:54 a.m. OK Java 11 TESTS 17 202 0
107500198 saurabh_kl D Feb. 16, 2021, 4:32 a.m. OK Java 11 TESTS 17 202 0
107494516 rafee69029 D Feb. 16, 2021, 1:08 a.m. OK Java 11 TESTS 17 202 0
107475826 nick_301 D Feb. 15, 2021, 5:10 p.m. OK Java 11 TESTS 13 202 0
107466845 global_optimum D Feb. 15, 2021, 4:29 p.m. OK Java 11 TESTS 13 202 0
107466029 soumit915 D Feb. 15, 2021, 4:28 p.m. OK Java 11 TESTS 13 202 0
107489704 MubtasimShahriar D Feb. 15, 2021, 9:14 p.m. OK Java 8 TESTS 13 109 0
107468935 puchipuu D Feb. 15, 2021, 4:32 p.m. OK Java 8 TESTS 13 109 0
107481067 akshaygupta26 D Feb. 15, 2021, 6:14 p.m. OK Java 8 TESTS 13 124 0
107468887 ramuked D Feb. 15, 2021, 4:32 p.m. OK Java 8 TESTS 13 124 0
107491558 I_love_dp D Feb. 15, 2021, 10:22 p.m. OK Java 8 TESTS 13 124 0
107479519 procrastinate7 D Feb. 15, 2021, 5:52 p.m. OK Java 8 TESTS 13 139 0
107465338 ag157 D Feb. 15, 2021, 4:26 p.m. OK Java 8 TESTS 13 140 0
107494467 sama2ayman2 D Feb. 16, 2021, 1:05 a.m. OK Java 8 TESTS 17 140 0
107492144 flyman3046 D Feb. 15, 2021, 10:48 p.m. OK Java 8 TESTS 13 140 0
107490695 G.A.T.C D Feb. 15, 2021, 9:48 p.m. OK Java 8 TESTS 13 140 0
107495127 Spheniscine D Feb. 16, 2021, 1:43 a.m. OK Kotlin TESTS 17 140 0
107498222 pallav12 D Feb. 16, 2021, 3:40 a.m. OK Kotlin TESTS 17 202 0
107498088 pallav12 D Feb. 16, 2021, 3:36 a.m. OK Kotlin TESTS 17 936 0
107498470 pallav12 D Feb. 16, 2021, 3:47 a.m. OK Kotlin TESTS 17 1325 0
107497915 pallav12 D Feb. 16, 2021, 3:31 a.m. OK Kotlin TESTS 17 1715 0
107486568 DMN D Feb. 15, 2021, 7:53 p.m. OK Mono C# TESTS 13 311 209715200
107500345 kkdying D Feb. 16, 2021, 4:36 a.m. OK MS C++ TESTS 17 218 0
107471659 dingzhao777 D Feb. 15, 2021, 4:40 p.m. OK MS C++ 2017 TESTS 13 31 0
107478853 songuno1 D Feb. 15, 2021, 5:43 p.m. OK MS C++ 2017 TESTS 13 31 204800
107466918 songuno1 D Feb. 15, 2021, 4:29 p.m. OK MS C++ 2017 TESTS 13 31 204800
107464609 teoretik D Feb. 15, 2021, 4:25 p.m. OK MS C++ 2017 TESTS 13 46 1024000
107465956 levi2001 D Feb. 15, 2021, 4:27 p.m. OK MS C++ 2017 TESTS 13 77 0
107502457 Terry55 D Feb. 16, 2021, 5:21 a.m. OK MS C++ 2017 TESTS 17 77 0
107477092 jackcaptain D Feb. 15, 2021, 5:23 p.m. OK MS C++ 2017 TESTS 13 77 614400
107465131 qing_lin D Feb. 15, 2021, 4:26 p.m. OK MS C++ 2017 TESTS 13 77 4812800
107466312 SKeL D Feb. 15, 2021, 4:28 p.m. OK MS C++ 2017 TESTS 13 187 0
107467409 maraevkonstantin D Feb. 15, 2021, 4:30 p.m. OK MS C++ 2017 TESTS 13 280 0
107474534 beethoven97 D Feb. 15, 2021, 4:58 p.m. OK PyPy 2 TESTS 13 109 1433600
107476522 beethoven97 D Feb. 15, 2021, 5:17 p.m. OK PyPy 2 TESTS 13 124 2867200
107474427 beethoven97 D Feb. 15, 2021, 4:57 p.m. OK PyPy 2 TESTS 13 140 3686400
107468947 kagu D Feb. 15, 2021, 4:32 p.m. OK PyPy 2 TESTS 13 187 1331200
107472324 raj1307 D Feb. 15, 2021, 4:44 p.m. OK PyPy 2 TESTS 13 311 2355200
107476310 aayush_1607 D Feb. 15, 2021, 5:14 p.m. OK PyPy 2 TESTS 13 343 921600
107465245 soyluy D Feb. 15, 2021, 4:26 p.m. OK PyPy 2 TESTS 13 467 1024000
107475134 Amplifier. D Feb. 15, 2021, 5:03 p.m. OK PyPy 2 TESTS 13 794 8908800
107471300 lebron87 D Feb. 15, 2021, 4:39 p.m. OK PyPy 2 TESTS 13 1075 9318400
107469871 rivnam D Feb. 15, 2021, 4:34 p.m. OK PyPy 3 TESTS 13 124 3686400
107468117 yash_0402 D Feb. 15, 2021, 4:31 p.m. OK PyPy 3 TESTS 13 124 3788800
107469856 Kira_1234 D Feb. 15, 2021, 4:34 p.m. OK PyPy 3 TESTS 13 140 3788800
107482721 Genius3435 D Feb. 15, 2021, 6:40 p.m. OK PyPy 3 TESTS 13 140 3891200
107475092 uttaran_das D Feb. 15, 2021, 5:03 p.m. OK PyPy 3 TESTS 13 140 3993600
107470099 shade33 D Feb. 15, 2021, 4:34 p.m. OK PyPy 3 TESTS 13 140 4198400
107481498 momoka0122y D Feb. 15, 2021, 6:21 p.m. OK PyPy 3 TESTS 13 140 4608000
107466377 U3L D Feb. 15, 2021, 4:28 p.m. OK PyPy 3 TESTS 13 140 4710400
107472979 rajbit D Feb. 15, 2021, 4:48 p.m. OK PyPy 3 TESTS 13 155 2764800
107504725 akifpathan D Feb. 16, 2021, 6:02 a.m. OK PyPy 3 TESTS 17 155 3891200
107471909 Koki_tkg D Feb. 15, 2021, 4:42 p.m. OK Python 3 TESTS 13 78 409600
107495468 abinashgogoi D Feb. 16, 2021, 2 a.m. OK Python 3 TESTS 17 93 409600
107493130 samuellito D Feb. 15, 2021, 11:43 p.m. OK Python 3 TESTS 17 93 409600
107487963 aparahuja123 D Feb. 15, 2021, 8:24 p.m. OK Python 3 TESTS 13 93 409600
107465132 nsharc4 D Feb. 15, 2021, 4:26 p.m. OK Python 3 TESTS 13 93 409600
107489341 shashank_2001 D Feb. 15, 2021, 9:01 p.m. OK Python 3 TESTS 13 93 1126400
107482037 codemaster_69 D Feb. 15, 2021, 6:29 p.m. OK Python 3 TESTS 13 93 1126400
107477450 hogrider D Feb. 15, 2021, 5:26 p.m. OK Python 3 TESTS 13 139 0
107475684 hidir D Feb. 15, 2021, 5:08 p.m. OK Python 3 TESTS 13 139 0
107501328 Ohlamon D Feb. 16, 2021, 4:58 a.m. OK Python 3 TESTS 17 140 0
107467223 GraphTheory D Feb. 15, 2021, 4:30 p.m. OK Rust TESTS 13 30 0
107485819 igor.v.karp D Feb. 15, 2021, 7:37 p.m. OK Scala TESTS 13 1138 0

remove filters

Back to search problems