Submit solution
Points:
0.70 (partial)
Time limit:
1.0s
Memory limit:
512M
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch
In case the statement didn't load correctly, you can download the statement here: Statement
Lưu ý: các bạn không nhập, xuất dữ liệu bằng file kể cả khi đề bài có yêu cầu. Đọc, ghi dữ liệu được thực hiện ở stdin và stdout.
Comments
177013?
code python than khảo: d = int(input()) if d % 3 == 0: print(0) else: g = d % 3 k = g + 3 if str(g) in str(d) or str(k) in str(d): print(1) else: print(2)
Ý tưởng AC: Đầu tiên là kiểm tra nó có chia hết cho 3 ko, có thì xuất ra 0 rồi thoát luôn. Lấy biến "mod=N % 3".Sau đó duyệt lần lượt các chữ số của N. Nếu có số nào chia 3 bằng với mod => xuất ra 1 . Còn lại xuất ra 2.
Link code (chỉ tham khảo, đừng chép nhá) https://ideone.com/ZC4yh9
TY vì ý tưởng
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.