COD_NUM = 55480;
COD = COD_NUM+"";
A = parseInt(COD.charAt(0));
B = parseInt(COD.charAt(1));
C = parseInt(COD.charAt(2));
D = parseInt(COD.charAt(3));
E = parseInt(COD.charAt(4));
S = (6 * A) + (5 * B) + (4 * C) + (3 * D) + (2 * E);
DIGV = S % 7;
print('COD:', COD_NUM);
print('S:', S);
print('DIGV:', DIGV);
CiAgICBDT0RfTlVNID0gNTU0ODA7CiAgICBDT0QgPSBDT0RfTlVNKyIiOwoKICAgIEEgPSBwYXJzZUludChDT0QuY2hhckF0KDApKTsKICAgIEIgPSBwYXJzZUludChDT0QuY2hhckF0KDEpKTsKICAgIEMgPSBwYXJzZUludChDT0QuY2hhckF0KDIpKTsKICAgIEQgPSBwYXJzZUludChDT0QuY2hhckF0KDMpKTsKICAgIEUgPSBwYXJzZUludChDT0QuY2hhckF0KDQpKTsKCiAgICBTID0gKDYgKiBBKSArICg1ICogQikgKyAoNCAqIEMpICsgKDMgKiBEKSArICgyICogRSk7CiAgICBESUdWID0gUyAlIDc7CiAgICAKICAgIHByaW50KCdDT0Q6JywgQ09EX05VTSk7CiAgICBwcmludCgnUzonLCBTKTsKICAgIHByaW50KCdESUdWOicsIERJR1YpOwogICAg