Computer Science, asked by 8d127sastikadas, 9 days ago

Write a Java program to find xy ,where x=10,y=3.​

Answers

Answered by s1057shrinkila014160
1

Answer:

take this

Explanation:

Given a positive integer n. The task is to find the sum of product of x and y such that ⌊n/x⌋ = y (Integer Division).

Examples:

Input : n = 5

Output : 21

Following are the possible pairs of (x, y):

(1, 5), (2, 2), (3, 1), (4, 1), (5, 1).

So, 1*5 + 2*2 + 3*1 + 4*1 + 5*1

= 5 + 4 + 3 + 4 + 5

= 21.

Input : n = 10

Output : 87

Similar questions