I don't know which IDE or SDK you are using however writting a simple code:
You can directly read the SIM_FCFG1 register using a 32 bit variable to know Program flash size
Read SIM_SDID register using another variable to know RAM size.
And read Unique Identification Registers as the following post suggest
How to read the unique ID for K60?
Also, take a look at the reference manual, and perform the necesary masks to get the correct values.
You can use MCUXpresso IDE and install a Ke1xz SDK to do a mini project with this porpuse.