ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1457. Heating Main

Accepted in Java 1.7
Posted by Axmadjon 1 May 2014 10:56

import java.util.Scanner;

public class AcmTimusRu {
    public static void main(String argv[]) {
        String[] nf = new String[0];

        Scanner s = new Scanner(System.in);

        double somme = 0;
        double n = s.nextLong();

        for (int i = 0; i < n; i++) {
            somme += s.nextLong();
        }

        System.out.print((somme / n));
    }

}