/*! path:atcoder/abc154/e */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=r(n(1)),u=n(2);o.default.readFile("/dev/stdin","utf8",(function(t,e){!function(t){var e=new u.Solver,n=e.parse(t),r=e.solve(n);e.print(r)}(e)}))},function(t,e){t.exports=require("fs")},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});e.__esModule=!0;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.nCk=function(t,e){return t<e?0:3===e?t*(t-1)/2*(t-2)/3:2===e?t*(t-1)/2:1===e?t:1},e.prototype.solve=function(t){var e=t.N,n=t.K,r=0;if(e.length<n)return{answer:r};for(var o=n,u=0;u<e.length&&o>0;u++)0!==e[u]&&o>0&&(r+=this.nCk(e.length-u-1,o)*Math.pow(9,o),r+=(e[u]-1)*this.nCk(e.length-u-1,o-1)*Math.pow(9,o-1),o--);return{answer:++r}},e.prototype.parse=function(t){for(var e=t.split(/\s+/),n=e[0],r=parseInt(e[1]),o=[],u=0;u<n.length;u++)o.push(parseInt(n[u]));return{K:r,N:o}},e.prototype.print=function(t){console.log(t.answer)},e}(n(3).SolverBase);e.Solver=u},function(t,e,n){"use strict";e.__esModule=!0;var r=function(){};e.SolverBase=r}]);
//# sourceMappingURL=main.js.map