Coding Contest

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
 
Line 38: Line 38:
 
PASSED<br/>
 
PASSED<br/>
 
FAILED
 
FAILED
 +
 +
=== coding contest sessions ===
 +
 +
* [[Coding_Contest_18_August_2011|18th August 2011]]
 +
* [[Coding_Contest_14_April_2012|14th April 2012]]

Latest revision as of 19:49, 9 April 2012

Contents

[edit] What's that?

In this contest you have to solve problems of algorithmic nature with different degrees of difficulty. You can use the programming language you like.

The goal of this contest is not to find the best coder, but to enjoy coding together and to motivate others to start coding. If you can write a "hello world" program in any language, you are welcome. There will be certainly someone to help you to solve the tasks.

We will use the following example problem to make us familiar with the contest system.


[edit] Problem

Mr. Foo has to determine if his students have passed the year. As he has many students which have written many tests, he can't use his calculator, because it would take him too long. He knows that you are a skilled hacker, so he has asked you to make a program to automate his task.

He has S students. Each student has written N tests. The test scores ranges from 0 to 60 (both inclusive). A student has passed his year if he has an average score of more or equal to 30. The average is not rounded.


[edit] Input

You are given an input file. The first line consists of 2 integers: the number of students S (1 <= S <= 1000) and the number of tests N (1 <= N <= 1000). S lines follow, which consists of N integers, representing the scores of a student.


[edit] Output

You have to create an output file which contains one line per student. Each containing 'PASSED' if he has passed his year, otherwise 'FAILED'.


[edit] Input example

4 2
29 30
30 30
50 60
0 58

[edit] Output example

FAILED
PASSED
PASSED
FAILED

[edit] coding contest sessions

Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools