1. 

/** * FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* * Problem: 11703 - sqrt log sin
* * Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=117&problem=2750&mosmsg=Submission+received+with+ID+7883709
* *
* * @author Barny Porcio
* * @version 1.0, 04/08/2010
* *
* * Method : Ad-Hoc
* * Status : Accepted
* * Runtime: 0.776
* */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception, IOException {

int[] array = new int[1000001];
array[0] = 1;
for(int i = 1;i < array.length; ++i){
array[i] = (array[(int)(i - Math.sqrt(i))]
+ array[(int) Math.log(i)]
+ array[(int)(i* Math.pow(Math.sin(i), 2.0))]) %1000000;
}
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for (int t = Integer.parseInt(br.readLine()); t !=-1 ; t = Integer.parseInt(br.readLine()))
System.out.println(array[t]);
}
}


2.

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* Problem: 11703 sqrtlogsin
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=117&problem=2750&mosmsg=Submission+received+with+ID+7883453
*
* @author Barny Porcio
* @version 1.0, 04/08/2010
*
* Method : -
* Status : Accepted
* Runtime: 0.9400
*/

import java.util.Scanner;


public class sqrtlogsin11703 {
//leeres array für die lösung
static int[] ans;

//das array für die lösung wird gefüllt mit der gegebenen formel
static void initial(){
ans[0] = 1;
for (int i = 1; i <ans.length; ++i){
ans[i] = (ans[(int) (i-Math.sqrt(i))] + ans[(int) Math.log(i)]+ ans[(int)(i*Math.pow(Math.sin(i), 2))])%1000000 ;
}
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ans = new int[1000001];
initial();
Scanner sc = new Scanner(System.in);

for(int i = sc.nextInt(); i != -1; i = sc.nextInt()){
System.out.println(ans[i]);
}

}

}

3.

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* Problem: 11703 sqrtlogsin
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=117&problem=2750&mosmsg=Submission+received+with+ID+7883453
*
* @author Siegfried Ippisch
* @version 1.0, 06/08/2010
*
* Method : -
* Status : Accepted
* Runtime: 0.916
*/

import java.io.*;

public class Main {

private static int[] x = new int[1000001];

private static int x(int i){
if(x[i] > 0)
return x[i];

int result = ( x( (int)(i-Math.sqrt(i)) ) +
x( (int)(Math.log(i)) ) +
x( (int)(i*Math.sin(i)*Math.sin(i)) ) ) %1000000;

x[i] = result;

return result;
}

public static void main(String[] args) throws IOException{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
x[0]=1;

int next = Integer.parseInt(input.readLine());
while(next >= 0){
System.out.println(x(next));
next = Integer.parseInt(input.readLine());
}

input.close();
}

}