Submission with ID 12980904: AC with 0.012s.
This code has just 1 printf in comparison with 4 in the previous solution. But, the times are the same.