{"raw_statement":[{"iden":"statement","content":"_Even if the world is full of counterfeits, I still regard it as wonderful._\n\nPile up herbs and incense, and arise again from the flames and ashes of its predecessor — as is known to many, the phoenix does it like this.\n\nThe phoenix has a rather long lifespan, and reincarnates itself once every _a_! years. Here _a_! denotes the factorial of integer _a_, that is, _a_! = 1 × 2 × ... × _a_. Specifically, 0! = 1.\n\nKoyomi doesn't care much about this, but before he gets into another mess with oddities, he is interested in the number of times the phoenix will reincarnate in a timespan of _b_! years, that is, . Note that when _b_ ≥ _a_ this value is always integer.\n\nAs the answer can be quite large, it would be enough for Koyomi just to know **the last digit of the answer in decimal representation**. And you're here to provide Koyomi with this knowledge."},{"iden":"input","content":"The first and only line of input contains two space-separated integers _a_ and _b_ (0 ≤ _a_ ≤ _b_ ≤ 1018)."},{"iden":"output","content":"Output one line containing a single decimal digit — the last digit of the value that interests Koyomi."},{"iden":"examples","content":"Input\n\n2 4\n\nOutput\n\n2\n\nInput\n\n0 10\n\nOutput\n\n0\n\nInput\n\n107 109\n\nOutput\n\n2"},{"iden":"note","content":"In the first example, the last digit of is 2;\n\nIn the second example, the last digit of is 0;\n\nIn the third example, the last digit of is 2."}],"translated_statement":[{"iden":"statement","content":"_即使世界充满赝品，我仍视其为美妙。_\n\n堆积草药与香料，从其前身的火焰与灰烬中重生——正如许多人所知，凤凰正是如此行事。\n\n凤凰拥有相当长的寿命，每 #cf_span[a!] 年重生一次。这里 #cf_span[a!] 表示整数 #cf_span[a] 的阶乘，即 #cf_span[a! = 1 × 2 × ... × a]。特别地，#cf_span[0! = 1]。\n\nKoyomi 并不太关心这一点，但在他再次陷入怪异之事前，他感兴趣的是在 #cf_span[b!] 年的时间跨度内，凤凰将重生多少次，即 。注意当 #cf_span[b ≥ a] 时，该值始终为整数。\n\n由于答案可能非常大，Koyomi 只需知道答案在十进制表示下的*最后一位数字*即可。而你正是要为 Koyomi 提供这一信息。\n\n输入的第一行且唯一一行包含两个用空格分隔的整数 #cf_span[a] 和 #cf_span[b]（#cf_span[0 ≤ a ≤ b ≤ 1018]）。\n\n输出一行，包含一个十进制数字——即 Koyomi 所关心的值的最后一位数字。\n\n在第一个示例中， 的最后一位数字是 #cf_span[2]；\n\n在第二个示例中， 的最后一位数字是 #cf_span[0]；\n\n在第三个示例中， 的最后一位数字是 #cf_span[2]。\n\n"},{"iden":"input","content":"输入的第一行且唯一一行包含两个用空格分隔的整数 #cf_span[a] 和 #cf_span[b]（#cf_span[0 ≤ a ≤ b ≤ 1018]）。"},{"iden":"output","content":"输出一行，包含一个十进制数字——即 Koyomi 所关心的值的最后一位数字。"},{"iden":"examples","content":"输入\n2 4\n输出\n2\n\n输入\n0 10\n输出\n0\n\n输入\n107 109\n输出\n2"},{"iden":"note","content":"在第一个示例中， 的最后一位数字是 #cf_span[2]；在第二个示例中， 的最后一位数字是 #cf_span[0]；在第三个示例中， 的最后一位数字是 #cf_span[2]。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ a, b \\in \\mathbb{Z} $ with $ 0 \\leq a \\leq b \\leq 10^{18} $.  \n\n**Objective**  \nCompute the last decimal digit of $ \\frac{b!}{a!} $.  \n\n**Note**  \nSince $ b \\geq a $, $ \\frac{b!}{a!} = (a+1)(a+2)\\cdots b $ is an integer.  \nWe seek $ \\left( \\prod_{i=a+1}^{b} i \\right) \\mod 10 $.","simple_statement":null,"has_page_source":false}