Google рд╕реНрдкреНрд░реЗрдбрд╢реАрдЯ рдкрд░ рдЯрд┐рди рдХреА рдЬрд╛рдБрдЪ рдХрд░рдирд╛

рдЗрд╕рд╕реЗ рдкрд╣рд▓реЗ, рдореИрдВрдиреЗ рдкрд╣рд▓реЗ рд╣реА рдирдИ Google рд╕реНрдкреНрд░реЗрдбрд╢реАрдЯ рд╕реЗрд╡рд╛рдУрдВ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реБрдП рд╢рдмреНрджреЛрдВ рдореЗрдВ рдПрдХ рд░рд╛рд╢рд┐ рдЙрддреНрдкрдиреНрди рдХрд░рдиреЗ рдХрд╛ рдПрдХ рдЙрджрд╛рд╣рд░рдг рдкреНрд░рдХрд╛рд╢рд┐рдд рдХрд┐рдпрд╛ рдерд╛
habrahabr.ru/blogs/google/104057

рдЕрдм TIN рджрд░реНрдЬ рдХрд░рдиреЗ рдХреА рд╢реБрджреНрдзрддрд╛ рдХреА рдЬрд╛рдБрдЪ рдХрд╛ рдХрд╛рд░реНрдп рднреА рд▓рд╛рдЧреВ рдХрд┐рдпрд╛ рдЧрдпрд╛ рд╣реИред

рддрд╛рд▓рд┐рдХрд╛ рдЦреЛрд▓реЗрдВ
рдмрд╕ рдЕрдкрдиреЗ рдЦрд╛рддреЗ рдореЗрдВ рддрд╛рд▓рд┐рдХрд╛ рдХреЛ рдХреЙрдкреА рдХрд░реЗрдВ рдФрд░ рдЖрд╡рд╢реНрдпрдХ рдлрд╝реАрд▓реНрдб рдореЗрдВ рдореВрд▓реНрдп рдХреЗ рд▓рд┐рдВрдХ рдХреЗ рд╕рд╛рде = is_valid_inn ( A3 ) рджрд░реНрдЬ рдХрд░реЗрдВ
рд╕реНрд░реЛрдд рдХреЛрдб

Copy Source | Copy HTML

  1. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  2. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  3. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  4. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  5. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  6. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  7. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  8. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  9. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  10. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  11. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  12. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  13. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  14. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  15. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  16. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  17. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  18. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  19. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  20. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  21. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  22. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  23. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  24. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  25. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  26. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  27. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  28. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  29. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
  30. // function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ


news.eastgeology.com/2010/09/google-spreadsheets_19.html - рдЙрджрд╛рд╣рд░рдг рдПрдореНрдмреЗрдбреЗрдб рддрд╛рд▓рд┐рдХрд╛

Source: https://habr.com/ru/post/In104534/


All Articles