Editorial for HSG THPT Hải Phòng 2023 - Bài 2
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Ta duyệt qua từng ký tự trong xâu và duy trì một biến đếm số chữ số trong các ký tự đã được duyệt. Nếu ký tự đang xét có mã ASCII lớn hơn ASCII của ~0~ và bé hơn ASCII của ~9~ thì đây chính là một ký tự chữ số, ta tăng biến đếm lên ~1~ đơn vị.
Độ phức tạp : ~O(|S|)~
Comments