Lotion.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package senseofsecuritz;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
*
* @author istenik3
*/
public class Lotion {
while((line = reader.readLine()) != null) {
int n
= Integer.
parseInt(line.
substring(2));
}
}
static public int solve(long n) {
int pocet = 0;
for(long x=(n+1); x<=2*n; x++) {
long y=(x*n)/(x-n);
if(right(x, y, n)) {
pocet++;
}
}
return pocet;
}
static public boolean right(long x, long y, long n) {
return ((x*y) / (x+y)) == n;
}
}