3 kyu

Sum of two squares : Performance edition

Description:

For given integer n find integers a, b such that a^2 + b^2 = n and a + b is maximal. Return a + b if n can be expressed, otherwise return 0.

n can be ~70 bits long and its prime factors will not exceed 32 bits.

There is easier version of this problem.

Mathematics
Number Theory
Performance

Stats:

CreatedMay 29, 2024
PublishedMay 29, 2024
Warriors Trained771
Total Skips46
Total Code Submissions1070
Total Times Completed44
Python Completions28
JavaScript Completions18
Total Stars49
% of votes with a positive feedback rating88% of 12
Total "Very Satisfied" Votes9
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes0
Total Rank Assessments5
Average Assessed Rank
3 kyu
Highest Assessed Rank
3 kyu
Lowest Assessed Rank
3 kyu
Ad
Contributors
  • topologoanatom Avatar
  • dfhwze Avatar
Ad