{"problem":{"name":"Digit Products","description":{"content":"For how many positive integers at most $N$ is the product of the digits at most $K$?","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc208_e"},"statements":[{"statement_type":"Markdown","content":"For how many positive integers at most $N$ is the product of the digits at most $K$?\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^{18}$\n*   $1 \\leq K \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc208_e","tags":[],"sample_group":[["13 2","5\n\nOut of the positive integers at most $13$, there are five such that the product of the digits is at most $2$: $1$, $2$, $10$, $11$, and $12$."],["100 80","99\n\nOut of the positive integers at most $100$, all but $99$ satisfy the condition."],["1000000000000000000 1000000000","841103275147365677\n\nNote that the answer may not fit into a $32$\\-bit integer."]],"created_at":"2026-03-03 11:01:13"}}