As input, you are given a positive integer n. Output a code in response. Each n should generate a unique code. There are some constraints on the code that it outputs:
- The code must be 7 or more characters long in based on the input.
- The code will be have only 7 characters when input string is less than 676000 and must be unique.
- The code always begins with
- The third and fourth characters are letters from A-Z
- The remaining characters are numbers.
so if 1 then STAA001
2 then STAA002
upto 999 then STAA999
1K then STAB000
this will continue unto 676599 then STZZ999, (still this total count is 7) so after this for 676000 then STAA0000 (count is 8) and so on.
This is code golf, so the shortest entry in bytes wins.
KMT's original post for reference:
I need the generate the code using input value. The code must be 7 or more character Consider Sample code STAA000 in which 'ST' is always constant and next to characters changes based on the input they must alphabets from A-Z and the remaining characters are number.
Input Result 1. 100 STAA100 2. 2201 STAB201 3. 676001 STAA0001 4. 677111 STAA1111