Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85e2e08

Browse files
refactor 1362
1 parent04e0517 commit85e2e08

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

‎src/main/java/com/fishercoder/solutions/_1362.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
packagecom.fishercoder.solutions;
22

3-
/**
4-
* 1362. Closest Divisors
5-
*
6-
* Given an integer num, find the closest two integers in absolute difference whose product equals num + 1 or num + 2.
7-
* Return the two integers in any order.
8-
*
9-
* Example 1:
10-
* Input: num = 8
11-
* Output: [3,3]
12-
* Explanation: For num + 1 = 9, the closest divisors are 3 & 3, for num + 2 = 10, the closest divisors are 2 & 5, hence 3 & 3 is chosen.
13-
*
14-
* Example 2:
15-
* Input: num = 123
16-
* Output: [5,25]
17-
*
18-
* Example 3:
19-
* Input: num = 999
20-
* Output: [40,25]
21-
*
22-
* Constraints:
23-
* 1 <= num <= 10^9
24-
* */
253
publicclass_1362 {
264
publicstaticclassSolution1 {
275
publicint[]closestDivisors(intnum) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp