this is a very specific question, but i also have very specific details on what i'm looking for. i currently do not have (and cannot find) a good method for accomplishing this. please help if you can.
i have an integer list that will always contain 4 items and 3 of the items will always end in the same digit. i need to some how extract the 1 item that has a unique final digit. the unique item will not always be in the same location in the list and all numbers in the list will be a value from 0-40 (so one to two digits).
example list contents: 12,22,27,32. i need a method to return or extract the 27.
example 2: 4,13,23,33. i would need to return 4.
the solution should either remove the 3 repeated final digit numbers from the list or possibly create just a standard int variable with the unique value.
i've tried converting to a string and gather that character and have this ridiculous function that tests the integer length (number of digits) and adds just the end digit to another list and some comparison code. it's just really ridiculous. if you know of any ideas i should try, please let me know, thanks in advance.