Created
April 4, 2016 18:09
-
-
Save avm99963/2bed3a159f1996c44c96c36251c4c6ab to your computer and use it in GitHub Desktop.
Solver in PHP for the "Sum by one" problem in the test contest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// St. Paul's Code Jam – "Sum by one" solver | |
// @Author: avm99963 | |
$t = (int)fgets(STDIN); | |
function solve($n) { | |
return $n+1; | |
} | |
for ($x = 1; $x <= $t; $x++) { | |
$n = (int)fgets(STDIN); | |
$y = solve($n); | |
echo "Case #".$x.": ".$y."\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment