fork download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4. process.stdin.on('data', function (chunk) {
  5. const [hamburger, capacity] = chunk.trim().split(" ").map(Number);
  6. const minimunTime = (2 * hamburger) / capacity;
  7. process.stdout.write(minimunTime.toString());
  8. });
  9.  
  10. // Complejidad: O(1)
Success #stdin #stdout 0.13s 36060KB
stdin
1 51
stdout
0.0392156862745098