{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eLet \u003ci\u003eS\u003c/i\u003e(\u003ci\u003et\u003c/i\u003e) be the sum of integers represented by all substrings of the decimal representation of \u003ci\u003et\u003c/i\u003e.\r\nFor example, \u003ci\u003eS\u003c/i\u003e(1205) \u003d 1 + 2 + 0 + 5 + 12 + 20 + 05 + 120 + 205 + 1205 \u003d 1575. \r\nNote that some substrings can have leading zeros. Let \u003ci\u003eF\u003c/i\u003e(\u003ci\u003et\u003c/i\u003e,\u0026nbsp;\u003ci\u003ek\u003c/i\u003e) be the number which decimal representation is obtained by repeating \r\nthe decimal representation of \u003ci\u003et\u003c/i\u003e \u003ci\u003ek\u003c/i\u003e times.\r\nFor example, \u003ci\u003eF\u003c/i\u003e(1205,\u0026nbsp;3) \u003d 120512051205.\r\nGiven numbers \u003ci\u003ep\u003c/i\u003e, \u003ci\u003ek\u003c/i\u003e and \u003ci\u003em\u003c/i\u003e, calculate \u003ci\u003eS\u003c/i\u003e(\u003ci\u003eF\u003c/i\u003e(\u003ci\u003ep\u003c/i\u003e,\u0026nbsp;\u003ci\u003ek\u003c/i\u003e)) modulo \u003ci\u003em\u003c/i\u003e.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains one integer \u003ci\u003ep\u003c/i\u003e (1 ≤ \u003ci\u003ep\u003c/i\u003e \u0026lt; 10\u003csup\u003e100000\u003c/sup\u003e). The second line contains two space-separated integers \u003ci\u003ek\u003c/i\u003e and \u003ci\u003em\u003c/i\u003e (1 ≤ \u003ci\u003ek\u003c/i\u003e, \u003ci\u003em\u003c/i\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e).\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput the answer on a single line.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1205\r\n3 999999999\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e847123538\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}