Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
g152xx
Group Title
Find the no of positive integral solutions for the equations (1/x) + (1/y) = 1/N! (read 1 by n factorial) Print a single integer which is the no of positive integral solutions modulo 1000007.
Input:
N
Output:
Number of positive integral solutions for (x,y) modulo 1000007
Constraints:
1 <= N <= 10^6
Sample Input00:
1
Sample Output00:
1
Sample Input01:
32327
Sample Output 01:
656502
Sample Input02:
40921
Sample Output 02:
686720
 2 years ago
 2 years ago
g152xx Group Title
Find the no of positive integral solutions for the equations (1/x) + (1/y) = 1/N! (read 1 by n factorial) Print a single integer which is the no of positive integral solutions modulo 1000007. Input: N Output: Number of positive integral solutions for (x,y) modulo 1000007 Constraints: 1 <= N <= 10^6 Sample Input00: 1 Sample Output00: 1 Sample Input01: 32327 Sample Output 01: 656502 Sample Input02: 40921 Sample Output 02: 686720
 2 years ago
 2 years ago

This Question is Closed

g152xx Group TitleBest ResponseYou've already chosen the best response.1
Sample Problem Statement: Given an integer N, print 'hello world' N times. Sample Input 5 Sample Output hello world hello world hello world hello world hello world Solution in C _________________ #include <stdio.h> int main() { int i, n; scanf("%d", &n); for (i=0; i<n; i++) { printf("hello world\n"); } return 0; }
 2 years ago

mayankdevnani Group TitleBest ResponseYou've already chosen the best response.1
http://sharathpan.wordpress.com/2012/05/17/interviewstreetequationssolution/
 2 years ago

mayankdevnani Group TitleBest ResponseYou've already chosen the best response.1
No of solutions for the equation XY=N! is (e1+1)(e2+1)………..(en+1) where e1,e2…en are multiplicities of Prime Numbers below N. For Ex: XY=4! No of primes below 4= {2,3} 4!= 24= 23*31 where 3 and 1 are prime multiplicities of 24. so applying the formula (3+1)*(1+1)=8 (no of factors of 24={1,2,3,4,6,8,12,24}. Now the equation 1⁄x+1⁄y= N! can be transformed into (xN!)(yN!)=N!2 Hence No. of solutions of the above equation is (2e1+1)(2e2+1)………..(2en+1) Hence to solve the problem: 1) First find out the primes less than N 2) Find the prime multiplicities 3) Apply the formula.
 2 years ago

g152xx Group TitleBest ResponseYou've already chosen the best response.1
thanks @mayankdevnani
 2 years ago

mayankdevnani Group TitleBest ResponseYou've already chosen the best response.1
welcome
 2 years ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.