fork(1) 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.1s 36080KB
stdin
10 2
stdout
10