Advertisement
ErolKZ

Untitled

Jul 16th, 2021
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1.  
  2. function solve (input) {
  3.  
  4.  
  5. let theLastOfSectors = input[0];
  6.  
  7. let countRowsFirstSector = Number(input[1]);
  8.  
  9. let countOddRowsSeats = Number(input[2]);
  10.  
  11. let currentSector = '';
  12.  
  13.  
  14. for (let i = 0; i < 25; i++) {
  15.  
  16.  
  17. currentSector = 'BCDEFGHIJKLMNOPQRSTUVWXYZ'.charCodeAt(i);
  18.  
  19. console.log(currentSector);
  20.  
  21.  
  22.  
  23.  
  24.  
  25. if (theLastOfSectors.charCodeAt() < currentSector)
  26.  
  27. break;
  28.  
  29. }
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. }
  37.  
  38. solve ([
  39.  
  40. 'B',
  41. '3',
  42. '2'
  43.  
  44. ]);
  45.  
  46.  
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement