fork(1) 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 5304KB
stdin
00:08 
Hello, this is the Rest and Relax program. 

00:17 
Relax your entire body. 

00:24 
Entire body. 

00:31 
Relax your mind. 

00:33 
Relax your mind. 

00:45 
What season do you like the most? 

00:54 
Season. 

00:58 
Maybe it's hot summer. 

01:03 
Hot summer. 

01:05 
God bless. 

01:08 
Or perhaps frosty winter. 

01:11 
Морозная зима. 

01:14 
Frosty winter. 

01:15 
Frosty winter. 

01:17 
Every season is beautiful. 

01:20 
Любое время года прекрасно. 

01:24 
Beautiful, beautiful. 

01:27 
Let's recall our previous autumn. 

01:32 
Changeable and wonderful. 

01:34 
Вспомним прошлую осень. 

01:37 
Изменчивую и прекрасную. 

01:41 
Changeable and wonderful. 

01:42 
and 

01:48 
Changeable autumn. 

01:59 
Summer has come to an end. 

02:02 
Вот и закончилось лето. 

02:06 
Has come to an end. 

02:11 
The heat has faded, but the cold hasn't come yet. 

02:16 
Жара уже спала, но холода еще не наступили. 

02:23 
Hasn't come yet. 

02:26 
The ladybird has settled comfortably on a leaf. 

02:32 
Божья коровка удобно устроилась на листочке. 

02:37 
Settled comfortably on a leaf. 

02:46 
The leaves have become yellow. 

02:51 
Листва пожелтела. 

02:54 
Leaves have become yellow. 

02:56 
Come yellow. 

03:05 
This bright yellow color brings us joy. 

03:08 
Этот яркий желтый цвет несет нам радость. 

03:14 
Bright yellow color. 

03:15 
Yellow and color. 

03:19 
It inspires optimism. 

03:25 
Inspires optimism. 

03:28 
It gives hope for the better. 

03:33 
Hope for the better. 

03:45 
But one can feel a slight melancholy 

03:48 
for summer's end. 

03:55 
For summer's end. 

03:58 
Autumn is the time for reflection. 

04:03 
Time for reflection. 

04:08 
We've managed to do a lot. 

04:14 
To do a lot. 

04:15 
We do. 

04:18 
We've achieved great successes. 

04:20 
Мы добились больших успехов. 

04:25 
Achieved great successes. 

04:34 
The last autumn roses are still blooming. 

04:39 
Еще цветут последние осенние розы. 

04:44 
Last autumn roses. 

04:45 
Last autumn. 

04:53 
In addition to buds, roses also have thorns. 

04:57 
Но кроме бутонов, у роз есть и шипы. 

05:03 
Also have thorns. 

05:05 
So we'll have... 

05:09 
It's so similar to our life. 

05:12 
Как похоже на нашу жизнь. 

05:16 
Our life. 

05:18 
Hardships are next to joy. 

05:21 
Неприятности соседствуют с радостями. 

05:26 
Next to joy. 

05:27 
to joy. 

05:31 
But we are able to overcome everything. 

05:35 
Мы все преодолеем. 

05:37 
Overcome everything. 

05:38 
Overcom- 

05:42 
We are strong and self-confident. 

05:45 
Мы сильны и уверены в себе. 

05:49 
Strong and self-confident. 

05:57 
The wind has begun to blow. 

06:00 
Поднимается ветер. 

06:03 
Begun to blow. 

06:06 
The weather will become worse soon. 

06:10 
Скоро погода испортится. 

06:13 
Become worse. 

06:16 
Autumn will show its other side. 

06:19 
Осень покажет себя с другой стороны. 

06:25 
Its other side. 

06:27 
A lovely day has changed to bad weather. 

06:45 
Погожий денек сменился ненастьем. 

06:51 
Lovely day has changed. 

06:55 
There is no better day. 

06:57 
Nobody in the street. 

06:59 
На улице ни души. 

07:01 
Nobody. 

07:09 
It's drizzling rain. 

07:11 
Идет моросящий дождь. 

07:15 
Drizzling rain. 

07:23 
The rain has become heavier. 

07:25 
Дождь льет все сильнее. 

07:29 
Become heavier. 

07:32 
The rain turns into a downpour. 

07:35 
Дождь превращается в ливень. 

07:39 
Downpour. 

07:42 
The rain has washed away all of the cares. 

07:47 
Дождь смыл все заботы. 

07:50 
All of the cares. 

07:55 
The water has taken away your hardships. 

07:57 
The water has taken away your hardships.

000
 
stdout
1
00:00:08,100 -> 00:00:17,000
Hello, this is the Rest and Relax program. 

2
00:00:17,100 -> 00:00:24,000
Relax your entire body. 

3
00:00:24,100 -> 00:00:31,000
Entire body. 

4
00:00:31,100 -> 00:00:33,000
Relax your mind. 

5
00:00:33,100 -> 00:00:45,000
Relax your mind. 

6
00:00:45,100 -> 00:00:54,000
What season do you like the most? 

7
00:00:54,100 -> 00:00:58,000
Season. 

8
00:00:58,100 -> 00:01:03,000
Maybe it's hot summer. 

9
00:01:03,100 -> 00:01:05,000
Hot summer. 

10
00:01:05,100 -> 00:01:08,000
God bless. 

11
00:01:08,100 -> 00:01:11,000
Or perhaps frosty winter. 

12
00:01:11,100 -> 00:01:14,000
Морозная зима. 

13
00:01:14,100 -> 00:01:15,000
Frosty winter. 

14
00:01:15,100 -> 00:01:17,000
Frosty winter. 

15
00:01:17,100 -> 00:01:20,000
Every season is beautiful. 

16
00:01:20,100 -> 00:01:24,000
Любое время года прекрасно. 

17
00:01:24,100 -> 00:01:27,000
Beautiful, beautiful. 

18
00:01:27,100 -> 00:01:32,000
Let's recall our previous autumn. 

19
00:01:32,100 -> 00:01:34,000
Changeable and wonderful. 

20
00:01:34,100 -> 00:01:37,000
Вспомним прошлую осень. 

21
00:01:37,100 -> 00:01:41,000
Изменчивую и прекрасную. 

22
00:01:41,100 -> 00:01:42,000
Changeable and wonderful. 

23
00:01:42,100 -> 00:01:48,000
and 

24
00:01:48,100 -> 00:01:59,000
Changeable autumn. 

25
00:01:59,100 -> 00:02:02,000
Summer has come to an end. 

26
00:02:02,100 -> 00:02:06,000
Вот и закончилось лето. 

27
00:02:06,100 -> 00:02:11,000
Has come to an end. 

28
00:02:11,100 -> 00:02:16,000
The heat has faded, but the cold hasn't come yet. 

29
00:02:16,100 -> 00:02:23,000
Жара уже спала, но холода еще не наступили. 

30
00:02:23,100 -> 00:02:26,000
Hasn't come yet. 

31
00:02:26,100 -> 00:02:32,000
The ladybird has settled comfortably on a leaf. 

32
00:02:32,100 -> 00:02:37,000
Божья коровка удобно устроилась на листочке. 

33
00:02:37,100 -> 00:02:46,000
Settled comfortably on a leaf. 

34
00:02:46,100 -> 00:02:51,000
The leaves have become yellow. 

35
00:02:51,100 -> 00:02:54,000
Листва пожелтела. 

36
00:02:54,100 -> 00:02:56,000
Leaves have become yellow. 

37
00:02:56,100 -> 00:03:05,000
Come yellow. 

38
00:03:05,100 -> 00:03:08,000
This bright yellow color brings us joy. 

39
00:03:08,100 -> 00:03:14,000
Этот яркий желтый цвет несет нам радость. 

40
00:03:14,100 -> 00:03:15,000
Bright yellow color. 

41
00:03:15,100 -> 00:03:19,000
Yellow and color. 

42
00:03:19,100 -> 00:03:25,000
It inspires optimism. 

43
00:03:25,100 -> 00:03:28,000
Inspires optimism. 

44
00:03:28,100 -> 00:03:33,000
It gives hope for the better. 

45
00:03:33,100 -> 00:03:45,000
Hope for the better. 

46
00:03:45,100 -> 00:03:48,000
But one can feel a slight melancholy 

47
00:03:48,100 -> 00:03:55,000
for summer's end. 

48
00:03:55,100 -> 00:03:58,000
For summer's end. 

49
00:03:58,100 -> 00:04:03,000
Autumn is the time for reflection. 

50
00:04:03,100 -> 00:04:08,000
Time for reflection. 

51
00:04:08,100 -> 00:04:14,000
We've managed to do a lot. 

52
00:04:14,100 -> 00:04:15,000
To do a lot. 

53
00:04:15,100 -> 00:04:18,000
We do. 

54
00:04:18,100 -> 00:04:20,000
We've achieved great successes. 

55
00:04:20,100 -> 00:04:25,000
Мы добились больших успехов. 

56
00:04:25,100 -> 00:04:34,000
Achieved great successes. 

57
00:04:34,100 -> 00:04:39,000
The last autumn roses are still blooming. 

58
00:04:39,100 -> 00:04:44,000
Еще цветут последние осенние розы. 

59
00:04:44,100 -> 00:04:45,000
Last autumn roses. 

60
00:04:45,100 -> 00:04:53,000
Last autumn. 

61
00:04:53,100 -> 00:04:57,000
In addition to buds, roses also have thorns. 

62
00:04:57,100 -> 00:05:03,000
Но кроме бутонов, у роз есть и шипы. 

63
00:05:03,100 -> 00:05:05,000
Also have thorns. 

64
00:05:05,100 -> 00:05:09,000
So we'll have... 

65
00:05:09,100 -> 00:05:12,000
It's so similar to our life. 

66
00:05:12,100 -> 00:05:16,000
Как похоже на нашу жизнь. 

67
00:05:16,100 -> 00:05:18,000
Our life. 

68
00:05:18,100 -> 00:05:21,000
Hardships are next to joy. 

69
00:05:21,100 -> 00:05:26,000
Неприятности соседствуют с радостями. 

70
00:05:26,100 -> 00:05:27,000
Next to joy. 

71
00:05:27,100 -> 00:05:31,000
to joy. 

72
00:05:31,100 -> 00:05:35,000
But we are able to overcome everything. 

73
00:05:35,100 -> 00:05:37,000
Мы все преодолеем. 

74
00:05:37,100 -> 00:05:38,000
Overcome everything. 

75
00:05:38,100 -> 00:05:42,000
Overcom- 

76
00:05:42,100 -> 00:05:45,000
We are strong and self-confident. 

77
00:05:45,100 -> 00:05:49,000
Мы сильны и уверены в себе. 

78
00:05:49,100 -> 00:05:57,000
Strong and self-confident. 

79
00:05:57,100 -> 00:06:00,000
The wind has begun to blow. 

80
00:06:00,100 -> 00:06:03,000
Поднимается ветер. 

81
00:06:03,100 -> 00:06:06,000
Begun to blow. 

82
00:06:06,100 -> 00:06:10,000
The weather will become worse soon. 

83
00:06:10,100 -> 00:06:13,000
Скоро погода испортится. 

84
00:06:13,100 -> 00:06:16,000
Become worse. 

85
00:06:16,100 -> 00:06:19,000
Autumn will show its other side. 

86
00:06:19,100 -> 00:06:25,000
Осень покажет себя с другой стороны. 

87
00:06:25,100 -> 00:06:27,000
Its other side. 

88
00:06:27,100 -> 00:06:45,000
A lovely day has changed to bad weather. 

89
00:06:45,100 -> 00:06:51,000
Погожий денек сменился ненастьем. 

90
00:06:51,100 -> 00:06:55,000
Lovely day has changed. 

91
00:06:55,100 -> 00:06:57,000
There is no better day. 

92
00:06:57,100 -> 00:06:59,000
Nobody in the street. 

93
00:06:59,100 -> 00:07:01,000
На улице ни души. 

94
00:07:01,100 -> 00:07:09,000
Nobody. 

95
00:07:09,100 -> 00:07:11,000
It's drizzling rain. 

96
00:07:11,100 -> 00:07:15,000
Идет моросящий дождь. 

97
00:07:15,100 -> 00:07:23,000
Drizzling rain. 

98
00:07:23,100 -> 00:07:25,000
The rain has become heavier. 

99
00:07:25,100 -> 00:07:29,000
Дождь льет все сильнее. 

100
00:07:29,100 -> 00:07:32,000
Become heavier. 

101
00:07:32,100 -> 00:07:35,000
The rain turns into a downpour. 

102
00:07:35,100 -> 00:07:39,000
Дождь превращается в ливень. 

103
00:07:39,100 -> 00:07:42,000
Downpour. 

104
00:07:42,100 -> 00:07:47,000
The rain has washed away all of the cares. 

105
00:07:47,100 -> 00:07:50,000
Дождь смыл все заботы. 

106
00:07:50,100 -> 00:07:55,000
All of the cares. 

107
00:07:55,100 -> 00:07:57,000
The water has taken away your hardships. 

108
00:07:57,100 -> 00:07:57,200
The water has taken away your hardships.