forked from Pratyasha01/CoderLifeMatters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoderLifeMatters.cpp
36 lines (33 loc) · 1020 Bytes
/
CoderLifeMatters.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
//input number of test case
int numberOfTestCase;
cin >> numberOfTestCase;
while(numberOfTestCase--){
//Initialize if codeOnDay == 1 , codeOnDay == 0.
int codeOnDay;
int numberOfDays=0,count=0,flag=0;
while(numberOfDays<30){
cin >> codeOnDay;
if(codeOnDay==0)
count=0;
else
count++;
// If the coder codes consecutively for more than 5 days, she gets bored.
if(count==6)
flag=1;
numberOfDays++;
}
if(flag==1)
//she has been bored
cout << "#coderlifematters" << "\n";
else
//she has not been bored
cout << "#allcodersarefun" << "\n";
}
return 0;
}