View Code of Problem 31

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			int k=sc.nextInt();
			int i=1;
			int j=23;
			if(k!=1){
				for(j=23;i<k;j=j+105){
					i++;
				}
			}
			System.out.println(j);
		}
	}
}

Double click to view unformatted code.


Back to problem 31