How to print a number of type std::ptrdiff_t with std::printf on Codeforces?

Правка en1, от xyf007, 2021-04-25 03:38:06

I searched printf on Wikipedia, and it says I should use std::printf("%td", x);. However it doesn't work on Codeforces. When I used it, it only printed two English characters t and d. See this submission 114157818. Also I wish to know how to print a std::size_t number. std::printf("%zu") doesn't work, either. Does it mean I have to cast it to int or use std::cout?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский xyf007 2021-04-25 03:38:06 537 Initial revision (published)