the Smart Beaver ABBYY invent new message encryption method want check performance check manually long tiresome decide ask ABBYY Cup contestant helpA message sequence n integer a1a2an encryption use key sequence m integer b1b2bm mn all number message key belong interval 0 c1 inclusive calculation perform modulo cEncryption perform nm1 step on step add number a1a2am correspond number b1b2bm on second step add number a2a3am1 change previous step correspond number b1b2bm and step number add number aiai1aim1 correspond number b1b2bm the result encryption sequence a1a2an nm1 stepsHelp Beaver write program encrypt message describe manner