C

java use system.out may be time out
and use String also may be time out
so , we can use StringBuilder