카타 8급 Super Duper Easy

PHP[ | ]

function problem($x){
  if(is_string($x)) return "Error";
  return $x*50+6;
}
function problem($x){
  return is_string($x) ? 'Error' : $x * 50 + 6;
}
function problem($x){
  return is_numeric($x) ? $x*50+6 : "Error";
}
function problem($x){
  if(gettype($x) === "string") return "Error";
  return $x*50+6; 
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}