fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. char str[255];
  7. char str2[255];
  8. char str3[255];
  9. char str4[255];
  10. char str5[255];
  11. int num = 1;
  12. int t = 1;
  13.  
  14. printf("%d\n", t);
  15. fgets(str4, 255, stdin);
  16.  
  17. do
  18. {
  19. // fgets(str, 255, stdin);
  20.  
  21. strcpy(str5, str);
  22. strcpy(str, str4);
  23. if (strlen(str) >= 3)
  24. if ((str[0] == '0') &&
  25. (str[1] == '0') &&
  26. (str[2] == '0')) num = 0;
  27.  
  28.  
  29. if (num == 1)
  30. {
  31. fgets(str2, 255, stdin);
  32. fgets(str3, 255, stdin);
  33. fgets(str4, 255, stdin);
  34.  
  35. if ((strlen(str) >= 5) && (strlen(str4) >= 5)) {
  36. if ((str[0] == '0') && (str[2] == ':'))
  37. printf("00:0%c:%c%c,100 -> 00:0%c:%c%c,000\n",
  38. str[1],str[3],str[4],str4[1],str4[3],str4[4]);
  39. printf("%s",str2);
  40. printf("%s",str3);
  41. if (str3[0] == '\n')
  42. { t++;
  43. printf("%d\n", t);
  44. }
  45. }
  46. // printf("\n");
  47. }
  48.  
  49. }
  50. while (num);
  51.  
  52. if ((str5[0] == '0') && (str5[2] == ':'))
  53. printf("00:0%c:%c%c,100 --> 00:0%c:%c%c,200\n",
  54. str5[1],str5[3],str5[4],str5[1],str5[3],str5[4]);
  55. printf("%s",str2);
  56. printf("%s",str3);
  57.  
  58. return 0;
  59. }
  60.  
Success #stdin #stdout 0s 5316KB
stdin
00:01 
We are brave, we are bright, we get our words right, and we grow while we play. 

00:08 
Learn more every day, words to grow, words to grow. 

00:17 
hello young travelers today we are at a railway station you can start a trip at the railway 

00:25 
station what can you see at the railway station let's learn some new words these are rails 

00:36 
Peace. 

00:36 
This is a train. 

00:40 
This is a train schedule. 

00:44 
This is a clock. 

00:48 
This is a conductor. 

00:48 
Ladies and gentlemen, it's time to turn. 

00:51 
Let's match these pictures. 

00:54 
These are rails. 

00:56 
Trains ride on the rails. 

00:59 
This is a train. 

01:01 
It is very fast. 

01:04 
This is a train schedule. 

01:06 
It shows us when the trains arrive. 

01:10 
This is a clock. 

01:11 
It shows the time. 

01:13 
This is a conductor. 

01:15 
He checks the tickets. 

01:17 
Super! Let's see if you remember the words. 

01:20 
Try this quiz. Where are the rails? 

01:28 
You're right. These are the rails. Good job. 

01:33 
Where is the time schedule? 

01:39 
Correct. This is the time schedule. Well done. 

01:45 
Which one is the conductor? 

01:47 
Ladies and gentlemen, it is time to turn on the incident. 

01:51 
Yes, this is the conductor. Great! 

01:55 
And here is a tricky question for you. 

02:00 
Who is the passenger? 

02:05 
He is the passenger. Excellent job! 

02:09 
Passengers, please take your seats. 

02:13 
The train is leaving the railway station. 

02:20 
Woods to grow, woods to grow. 

000
stdout
1
00:00:01,100 -> 00:00:08,000
We are brave, we are bright, we get our words right, and we grow while we play. 

2
00:00:08,100 -> 00:00:17,000
Learn more every day, words to grow, words to grow. 

3
00:00:17,100 -> 00:00:25,000
hello young travelers today we are at a railway station you can start a trip at the railway 

4
00:00:25,100 -> 00:00:36,000
station what can you see at the railway station let's learn some new words these are rails 

5
00:00:36,100 -> 00:00:36,000
Peace. 

6
00:00:36,100 -> 00:00:40,000
This is a train. 

7
00:00:40,100 -> 00:00:44,000
This is a train schedule. 

8
00:00:44,100 -> 00:00:48,000
This is a clock. 

9
00:00:48,100 -> 00:00:48,000
This is a conductor. 

10
00:00:48,100 -> 00:00:51,000
Ladies and gentlemen, it's time to turn. 

11
00:00:51,100 -> 00:00:54,000
Let's match these pictures. 

12
00:00:54,100 -> 00:00:56,000
These are rails. 

13
00:00:56,100 -> 00:00:59,000
Trains ride on the rails. 

14
00:00:59,100 -> 00:01:01,000
This is a train. 

15
00:01:01,100 -> 00:01:04,000
It is very fast. 

16
00:01:04,100 -> 00:01:06,000
This is a train schedule. 

17
00:01:06,100 -> 00:01:10,000
It shows us when the trains arrive. 

18
00:01:10,100 -> 00:01:11,000
This is a clock. 

19
00:01:11,100 -> 00:01:13,000
It shows the time. 

20
00:01:13,100 -> 00:01:15,000
This is a conductor. 

21
00:01:15,100 -> 00:01:17,000
He checks the tickets. 

22
00:01:17,100 -> 00:01:20,000
Super! Let's see if you remember the words. 

23
00:01:20,100 -> 00:01:28,000
Try this quiz. Where are the rails? 

24
00:01:28,100 -> 00:01:33,000
You're right. These are the rails. Good job. 

25
00:01:33,100 -> 00:01:39,000
Where is the time schedule? 

26
00:01:39,100 -> 00:01:45,000
Correct. This is the time schedule. Well done. 

27
00:01:45,100 -> 00:01:47,000
Which one is the conductor? 

28
00:01:47,100 -> 00:01:51,000
Ladies and gentlemen, it is time to turn on the incident. 

29
00:01:51,100 -> 00:01:55,000
Yes, this is the conductor. Great! 

30
00:01:55,100 -> 00:02:00,000
And here is a tricky question for you. 

31
00:02:00,100 -> 00:02:05,000
Who is the passenger? 

32
00:02:05,100 -> 00:02:09,000
He is the passenger. Excellent job! 

33
00:02:09,100 -> 00:02:13,000
Passengers, please take your seats. 

34
00:02:13,100 -> 00:02:20,000
The train is leaving the railway station. 

35
00:02:20,100 --> 00:02:20,200
Woods to grow, woods to grow.