CF1194G.Another Meme Problem
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Let's call a fraction yx good if there exists at least one another fraction y′x′ such that yx=y′x′ , 1≤x′,y′≤9 , the digit denoting x′ is contained in the decimal representation of x , and the digit denoting y′ is contained in the decimal representation of y . For example, 1326 is a good fraction, because 1326=12 .
You are given an integer number n . Please calculate the number of good fractions yx such that 1≤x≤n and 1≤y≤n . The answer may be really large, so print it modulo 998244353 .
输入格式
The only line of the input contains one integer n ( 1≤n<10100 ).
输出格式
Print the number of good fractions yx such that 1≤x≤n and 1≤y≤n . The answer may be really large, so print it modulo 998244353 .
输入输出样例
输入#1
42
输出#1
150
输入#2
3141592653589793238462643383279
输出#2
459925407