Giúp mih với ạ: Câu 1: Tìm Số Cho một số nguyên dương , cộng tất cả các chữ số của ta được số . Nếu là số có một chữ số thì dừng lại, ngược lại tiếp tục cộng các chữ số của được số mới là , tiếp tục quá trình trên với số cho đến khi kết quả là số có một chữ số. Ví dụ: = 123456; = 1 + 2 + 3 + 4 + 5 + 6 = 21; = 2 + 1 = 3; khi = 3 thì dừng lại. Yêu cầu: Cho số nguyên dương . Hãy tìm số có một chữ số của quá trình trên. Dữ liệu vào: Từ file văn bản TIMSO.INP một dòng chứa số nguyên dương (số chữ số của ≤ 10 ). Kết quả: Ghi vào file văn bản TIMSO.OUT một số tự nhiên là kết quả tìm được. Ví dụ: Ràng buộc: • Có 50% số test ứng với 50% số điểm của bài có ≤ 10 ; • Có 25% số test ứng với 25% số điểm của bài có số chữ số của ≤ 255; • Có 25% số test còn lại ứng với 25% số điểm của bài có số chữ số của ≤ 10 .

Các câu hỏi liên quan

EX8. Điền giới từ thích hợp vào chỗ trống. 1. Her book is …. the table. 2. Are there many people … the bookstore? 3. There’s a restaurant … ..to my house. 4. Are you free … Sunday? 5. I often get up … 6 o’clock every morning. 6. Nam’s house is next … a museum. 7. Mai is going … Hue. 8. The apple trees are … the garden. 9. Your eraser is … the box. 10. What do you do….Tet? 11. I often go to school ….foot. 12. How did you go to Ha Long Bay?….coach 13. Go straight ahead. It is….your left 14. The cinema is …the corner of the street, next …the theatre 15.It will be rainy…Hanoi tomorrow. EX 9. Sắp xếp từ thành câu hoàn chỉnh 1, bus/can/you/take/22/number.stops/entrance/zoo/at the/right/it/.=> 2, school/have/a/trip/we/going/are/to/weekend/next/=> 3, Linda/pictures/free/her/time/draws/often/in/.=> 4. she/ architect/ an/like/would/be/she/design/would/buildings/like/to/be/because/. => 5. shouldn’t/why/chocolate/ much/too/you/eat/?=> 6. will/weather/ like/be/what/the/tomorrow/?=> 7. warm/it/be/will/and foggy/Hue/in/tomorrow/.=> 8. what/like/country/your/is/summer/in/?=> 9.seasons/there/ many/are/how/?=> 10. I/summer/like/swim/I/sea/the/in/can/because/ => 11. doing/ is/ mother/ what/ your?=> 2. An/ Hung /are/ what/ doing/ now/ and?=> 13. that/ Hanoi/ to/ going/ businessman/ is=> 14. truck/ is he/ driving/ his.=> 15. waiting/ is/ who/ he/ for?=> 16. driving/ to /Quang/ is/ Hue.=> 17. vegetable/ the/ market/ to/ taking/ is/ he/ the.=> 18. Nha Trang/ the is/ train/ to/ going=>. 19. the garden/ the/ are/ children/ playing/ in.=> 20. brushing/ teeth/ Mai/ her/ is.=>