Skip to content

Commit 9987a3c

Browse files
committed
Initial commit
0 parents  commit 9987a3c

File tree

949 files changed

+71247
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

949 files changed

+71247
-0
lines changed

easy/001-fizz-buzz/input.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
3 5 10
2+
2 7 15

easy/001-fizz-buzz/meta.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
problemId: 1
2+
name: Fizz Buzz
3+
category: Easy
4+
summary: A simple game involving divisibility tests.
5+
url: https://www.codeeval.com/browse/1/

easy/001-fizz-buzz/readme.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<h2>Fizz Buzz</h2>
2+
3+
<h3>Challenge Description:</h3>
4+
5+
<p>
6+
Players generally sit in a circle. The first player says the number &#x201C;1&#x201D;, and each player says next number in turn.
7+
However, any number divisible by X (for example, three) is replaced by the word <em>fizz</em>, and any divisible
8+
by Y (for example, five) by the word <em>buzz</em>. Numbers divisible by both become <em>fizz buzz</em>. A player
9+
who hesitates, or makes a mistake is eliminated from the game.
10+
</p>
11+
<p>
12+
Write a program that prints out the final series of numbers where those divisible by X, Y and both are replaced
13+
by &#x201C;F&#x201D; for <em>fizz</em>, &#x201C;B&#x201D; for <em>buzz</em> and &#x201C;FB&#x201D; for <em>fizz buzz</em>.
14+
</p>
15+
16+
<h3>Input sample:</h3>
17+
<p>
18+
Your program should accept a file as its first argument. The file contains multiple separated lines; each line
19+
contains 3 numbers that are space delimited. The first number is the first divider (X), the second number is
20+
the second divider (Y), and the third number is how far you should count (N). You may assume that the input file
21+
is formatted correctly and the numbers are valid positive integers.
22+
</p>
23+
<p>
24+
For example:
25+
</p>
26+
27+
<pre class="description-input-output">3 5 10
28+
2 7 15</pre>
29+
30+
<h3>Output sample:</h3>
31+
32+
<p>
33+
Print out the series 1 through N replacing numbers divisible by X with &#x201C;F&#x201D;, numbers divisible by Y with &#x201C;B&#x201D;
34+
and numbers divisible by both with &#x201C;FB&#x201D;. Since the input file contains multiple sets of values, your output
35+
should print out one line per set. Ensure that there are no trailing empty spaces in each line you print.
36+
</p>
37+
38+
<pre class="description-input-output">1 2 F 4 B F 7 8 F B
39+
1 F 3 F 5 F B F 9 F 11 F 13 FB 15</pre>
40+
<h3>Constraints:</h3>
41+
<ul>
42+
<li>The number of test cases &#x2264; 20</li>
43+
<li>&quot;X&quot; is in range [1, 20]</li>
44+
<li>&quot;Y&quot; is in range [1, 20]</li>
45+
<li>&quot;N&quot; is in range [21, 100]</li>
46+
</ul>

easy/001-fizz-buzz/readme.pdf

32.6 KB
Binary file not shown.

easy/003-prime-palindrome/meta.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
problemId: 3
2+
name: Prime Palindrome
3+
category: Easy
4+
summary: Biggest prime palindrome < 1000.
5+
url: "https://www.codeeval.com/browse/3/"

easy/003-prime-palindrome/readme.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<h2>Prime Palindrome</h2>
2+
3+
<h3>Challenge Description:</h3>
4+
5+
<p>
6+
Write a program which determines the largest prime palindrome less than 1000.
7+
</p>
8+
9+
<h3>Input sample:</h3>
10+
<p>
11+
There is no input for this program.
12+
</p>
13+
14+
<h3>Output sample:</h3>
15+
16+
<p>
17+
Print to stdout the largest prime palindrome less than 1000.
18+
</p>
19+
20+
<pre>929
21+
</pre>

easy/003-prime-palindrome/readme.pdf

21.6 KB
Binary file not shown.

easy/004-sum-of-primes/meta.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
problemId: 4
2+
name: Sum of Primes
3+
category: Easy
4+
summary: Sum of first 1000 primes.
5+
url: "https://www.codeeval.com/browse/4/"

easy/004-sum-of-primes/readme.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<h2>Sum of Primes</h2>
2+
3+
<h3>Challenge Description:</h3>
4+
<p>
5+
Write a program which determines the sum of the first 1000 prime numbers.
6+
</p>
7+
8+
<h3>Input sample:</h3>
9+
<p>
10+
There is no input for this program.
11+
</p>
12+
13+
<h3>Output sample:</h3>
14+
15+
<p>
16+
Print to stdout the sum of the first 1000 prime numbers.
17+
</p>
18+
19+
<pre>3682913
20+
</pre>

easy/004-sum-of-primes/readme.pdf

22.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)