UVA 10925 - Krakovia

Problem PDF

Solution:

package mypkg;

import java.math.BigInteger;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
            int n=in.nextInt();
           int  f= in.nextInt();
            int no=0,i;
            while(n != 0 || f != 0 )
            {
            BigInteger sum= BigInteger.ZERO;
            for(i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10925/Main.java