카타 8급 Is he gonna survive?

1 C[ | ]

#include <stdbool.h>
#include <stdint.h>
bool hero(uint32_t bullets, uint32_t dragons) {
  return (bullets >= dragons*2);
}

2 C++[ | ]

bool hero(int bullets, int dragons) {
  return (bullets >= dragons*2);
}

3 Kotlin[ | ]

fun hero(bullets: Int, dragons: Int) : Boolean {
  return bullets >= dragons * 2
}
fun hero(bullets: Int, dragons: Int) = dragons <= bullets/2
fun hero(bullets: Int, dragons: Int) = bullets >= dragons * 2

4 PHP[ | ]

function hero(int $bullets, int $dragons){
  return ($bullets >= $dragons*2);
}

5 R[ | ]

hero <- function(bullets, dragons) {
  bullets >= dragons*2
}