Skip to content

Instantly share code, notes, and snippets.

@avm99963
Created April 4, 2016 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avm99963/2bed3a159f1996c44c96c36251c4c6ab to your computer and use it in GitHub Desktop.
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
<?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