Sắp đến ngày thi tin học trẻ nên Tý học tập rất chăm chỉ. Mỗi ngày Tý bắt đầu học vào lúc g1 giờ p1 phút và kết thúc việc học vào lúc g2 giờ p2 phút (0<=g1, g2<=23, 0<=p1, p2<=59) . Mẹ thấy Tý học hành chăm chỉ và biết Tý rất thích ăn hạt dẻ nên quyết định sẽ thưởng cho Tý như sau : cứ mỗi giờ tý học mẹ sẽ thưởng cho tý 10 hạt dẻ , ngoài ra học thêm phút nào sẽ được thưởng thêm một phút 2 hạt dẻ. Hãy viết chương trình giúp mẹ Tý tính tổng số hạt dẻ thưởng cho tý Dữ liệu vào từ tệp văn bản gồm 2 dòng như sau : - dòng 1 ghi hai số nguyên g1 và p1 cách nhau một dấu cách - dòng thứ 2 ghi số nguyên g2 và p2 cách nhau một dấu cách Kết quả fghi ra tệp văn bản STUDY.OUT một số là tổng hạt dẻ mà Tý nhận được Ví dụ STUDY.INP STUDY.OUT STUDY.INP STUDY.OUT 8 15 26 22 10 50 10 18 3 10 giải thích: tý học được 2 giờ 3 phút nên số hạt dẻ là : 2*10+3*2= 26 PASCAL NHA

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

Viết 1A 2B thôi mọi người 1.Malaysia is divided..........wo regions. A. to B. on C. in D. into 2. She often goes to the..to pray because her regions is Islam. A. church B. pagoda C. temple D. mosque 3. Mary was really.by the beauty of Hanoi. A. impress B. impression C. impressive D. impressed 4. The Unitcd Statc has a.. around 250 million. A. population B. separation C. addition D. introduction 5. Mathematics and Literature are..subjects in high schools. A. adding B. compulsory C. optional D. religious 6. It's very kind you to say so! A. in B. to 7. I wish Susan.harder for examination. C. for D. of A. will work B. worked C. has worked D. works 8. The "ao dai" is the...dress of Vietnamese women A. beautiful B. traditional C. casual D. baggy 9. The word Jeans comes..aa kind of material that was made in Europe. A. in B. at C. from 10. He..with friends in apartment in HCMC since last week. D. on A. living B. has lived C. lived D. live 11. They often go to that.......o pray. A. market B. hotel C. hostel D. shrine 12. There is a small bamboo.at the entrance to the village. A. forest B. forestation C. forest ranger D. forestry 13. There is a meeting... 9AM and 2PM A. on B. between C. till D. at 14. He was born.........15,Jauary A. in B. of C.at D. on 15. We have lived in Ha Noi.........4 years. A. in B. since C. for 16. We have many well.......... teachers here. D. at A. qualify B. quality C. qualified 17. She asked me where I......from A. come B. came C. to come D. coming 18. What aspect of................ih d you find diifcut? A. study B. studied C. learnt D. D. qualification 20. She thinks chatting on the Intermet is the time...... A. consume B. consumer C. consuming 21. Can you tell me who... this kind of machine. A. invented B. invention C. inventon D. inventive 22. Your teacher writes poems or storics,...she? A. don't B. won't C. didn't D. doesn't 23. Excuse me. Can .n in this area? A. smoke B. smoking C. smoked D. to smoke 24. Ifhe. student, he will get a discount. A. is B. was C. were D. will be 25. Can you turm.. the lights? It's too dark. A. on B. off C. in D. for 26. We can..easily in the daylight. A. to read B. reading C. reads D. read 27. What can we do to spend less..........ighting? A. in B. on C. about D. of 28. She is very tired; she has to finish her homework. A. morcover B. so C. and D. however 29. Is he an actor a singer? An actor. A. and B. on C. with D. so 30. I suggest ..money for the poor people in our neighborhood A. save B. to save C. saving D. saved 31. Who looks...your children when you are away from home? A. for B. at C. after D. to 32. He got wet..he forgot his umbrella. A. because of B. because C. but D. and 33. He is going to the post office...he wants to send a letter A. because B. but C. and D. moreover