indy256 / codejam-templates

Templates for Google Code Jam contest in different programming languages

Home Page:https://code.google.com/codejam/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codejam-templates

Templates for Google Code Jam contests in different programming languages.

In order to make a good demonstration of language constructs the following simple problem is solved by the templates.

Problem statement

Answer median and arithmetic mean calculation queries for given arrays of real numbers. For median queries arrays will have odd length. For each query answer must have 10 correctly rounded fractional digits.

Example of input:

2
median 3 2.32 1.55 3.17
mean 2 5 7

Example of output:

Case #1: 2.3200000000
Case #2: 6.0000000000

-- Feel free to contribute additional languages and corrections.

Todo: add multi-threaded templates.

About

Templates for Google Code Jam contest in different programming languages

https://code.google.com/codejam/

License:The Unlicense


Languages

Language:Java 17.7%Language:JavaScript 16.9%Language:C++ 16.5%Language:Scala 9.7%Language:C# 6.9%Language:D 6.7%Language:Groovy 4.6%Language:Kotlin 4.6%Language:Clojure 4.3%Language:Go 3.4%Language:Python 3.1%Language:Ruby 2.9%Language:Haskell 2.8%