this is the code that I have writen on the HuaWei Online Judge.