{"problem":{"name":"Lucky PIN","description":{"content":"AtCoder Inc. has decided to lock the door of its office with a $3$\\-digit PIN code. The company has an $N$\\-digit lucky number, $S$. Takahashi, the president, will erase $N-3$ digits from $S$ and conc","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"sumitb2019_d"},"statements":[{"statement_type":"Markdown","content":"AtCoder Inc. has decided to lock the door of its office with a $3$\\-digit PIN code.\nThe company has an $N$\\-digit lucky number, $S$. Takahashi, the president, will erase $N-3$ digits from $S$ and concatenate the remaining $3$ digits without changing the order to set the PIN code.\nHow many different PIN codes can he set this way?\nBoth the lucky number and the PIN code may begin with a $0$.\n\n## Constraints\n\n*   $4 \\leq N \\leq 30000$\n*   $S$ is a string of length $N$ consisting of digits.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"sumitb2019_d","tags":[],"sample_group":[["4\n0224","3\n\nTakahashi has the following options:\n\n*   Erase the first digit of $S$ and set `224`.\n*   Erase the second digit of $S$ and set `024`.\n*   Erase the third digit of $S$ and set `024`.\n*   Erase the fourth digit of $S$ and set `022`.\n\nThus, he can set three different PIN codes: `022`, `024`, and `224`."],["6\n123123","17"],["19\n3141592653589793238","329"]],"created_at":"2026-03-03 11:01:13"}}