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 0.01s 5312KB
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 my little friends today we are visiting a hot air balloon festival 

00:23 
let's fly through the sky it'll be beautiful up there what can you see at a balloon festival 

00:31 
This is a basket. 

00:35 
This is an envelope. 

00:39 
This is a burner. 

00:42 
This is a pilot. 

00:45 
This is a rope. 

00:48 
now let's organize these words this is the basket the passenger is ready to fly 

00:58 
this is the envelope it lifts up the basket this is the burner it warms up the air 

01:08 
this is the pilot welcome he flies the hot air balloon this is the rope 

01:16 
it holds the balloon on the ground. Super! Now, let's check what you remember. Which 

01:25 
one is the basket? Good answer! This is the basket. Which one is the burner? You're right! 

01:43 
This is the burner. Which one is the envelope? Great! This is the envelope. And the last 

01:59 
question is, which one is the airship? Fantastic! This is the airship. 

02:13 
We are taking off. Don't be afraid. Everything looks so interesting from up here. 

02:25 
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:23,000
hello my little friends today we are visiting a hot air balloon festival 

4
00:00:23,100 -> 00:00:31,000
let's fly through the sky it'll be beautiful up there what can you see at a balloon festival 

5
00:00:31,100 -> 00:00:35,000
This is a basket. 

6
00:00:35,100 -> 00:00:39,000
This is an envelope. 

7
00:00:39,100 -> 00:00:42,000
This is a burner. 

8
00:00:42,100 -> 00:00:45,000
This is a pilot. 

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

10
00:00:48,100 -> 00:00:58,000
now let's organize these words this is the basket the passenger is ready to fly 

11
00:00:58,100 -> 00:01:08,000
this is the envelope it lifts up the basket this is the burner it warms up the air 

12
00:01:08,100 -> 00:01:16,000
this is the pilot welcome he flies the hot air balloon this is the rope 

13
00:01:16,100 -> 00:01:25,000
it holds the balloon on the ground. Super! Now, let's check what you remember. Which 

14
00:01:25,100 -> 00:01:43,000
one is the basket? Good answer! This is the basket. Which one is the burner? You're right! 

15
00:01:43,100 -> 00:01:59,000
This is the burner. Which one is the envelope? Great! This is the envelope. And the last 

16
00:01:59,100 -> 00:02:13,000
question is, which one is the airship? Fantastic! This is the airship. 

17
00:02:13,100 -> 00:02:25,000
We are taking off. Don't be afraid. Everything looks so interesting from up here. 

18
00:02:25,100 --> 00:02:25,200
Woods to grow, woods to grow.