1. 

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem: f(91) (10696)
* @author Christian Mitterreiter
* @author Rolf Luigs
* @version 1.0, 05/12/2009
* Status : Accepted
* Runtime: 2.768
*/


import java.util.Scanner;

public class Main {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);
int input = sc.nextInt();

while(input!=0) {
if(input >= 101) System.out.println("f91(" + input + ") = " + (input-10));
else System.out.println("f91(" + input + ") = 91");

input = sc.nextInt();
}
}
}

2.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
* @author Taskin Umut Hidir Sayli Lermer Florian
*
* Applied Mathematics SS09 IFB-2C
* ACM Problem 10696
* @link http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=18&problem=1637&mosmsg=Submission+received+with+ID+7123485
* status: Accepted
* Runtime 1.964
*
*/
public class Main {

/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int x=Integer.parseInt(br.readLine())-10;
while(x!=-10)
{
System.out.println("f91("+(x+10)+") = "+((x>90)?x:"91"));
x=Integer.parseInt(br.readLine())-10;
}

}

}

3.

/**
* ACM
* UVa Status: accepted
* Run Time: 0.280
* Category: ad hoc
* @author Evgeni Pavlidis evgenipavlidis@yahoo.de
*/
#include <stdio.h>


int main()
{
int n;
scanf("%d", &n);
while(n > 0)
{
printf("f91(%d) = %d\n",n, (n < 102)? 91 : n-10 );
scanf("%d", &n);
}
}



4.

/**
* ACM
* UVa Status: TLE
* Run Time: > 3.000
* Category: ad hoc
* @author Evgeni Pavlidis evgenipavlidis@yahoo.de
Time Limit Exceeded !!!
*/

import java.io.*;
import java.util.*;

public class Main {


public static void main(String... args) throws Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n;

while((n = Integer.parseInt(reader.readLine())) > 0)
System.out.printf("f91(%d) = %d\n",n, (n < 102)? 91 : n-10 );
}

}

5.

/**
* ACM
* UVa Status: accepted
* Run Time: 0.500
* Category: ad hoc
* @author Evgeni Pavlidis evgenipavlidis@yahoo.de
@author Doina Logofatu logofatu@hm.edu
*/

import java.io.*;
import java.util.*;

public class Main {


public static void main(String... args) throws Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n;

PrintWriter w = new PrintWriter(System.out);
while((n = Integer.parseInt(reader.readLine())) > 0) {

w.print("f91(");
w.print(n);
w.print(") = ");
w.println((n < 102)? 91 : n-10);

//System.out.printf("f91(%d) = %d\n",n, (n < 102)? 91 : n-10 );
}
w.flush();
}

}