Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
In computing, the collection of four bits is called a nibble.
Chef defines a program as:
Given a program which takes N bits of memory, determine whether it is Good or Not Good.
For each test case, output Good or Not Good in a single line. You may print each character of Good or Not Good in uppercase or lowercase (for example, GoOd, GOOD, good will be considered identical).
Subtask #1 (100 points): original constraints
Input: 4
8
17
52
3
Output: Good
Not Good
Good
Not Good
Test case 1: The program requires 8 bits of memory. This is equivalent to 48=2 nibbles. Since 2 is an integer, this program is good.
Test case 2: The program requires 17 bits of memory. This is equivalent to 417=4.25 nibbles. Since 4.25 is not an integer, this program is not good.
Test case 3: The program requires 52 bits of memory. This is equivalent to 452=13 nibbles. Since 13 is an integer, this program is good.
Test case 4: The program requires 3 bits of memory. This is equivalent to 43=0.75 nibbles. Since 0.75 is not an integer, this program is not good.
#include <iostream>
using namespace std;
int main() { int t;
cin>>t;
while(t--){
int n;
cin>>n;
if(n%4==0){
cout<<"good"<<endl;
}
else{cout<<"not good"<<endl;
}}
// your code goes here
return 0;
}
# cook your dish here
for tc in range(int(input())):
N=int(input())
if N%4==0:
print('Good')
else:
print('not good')
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Scanner (System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++){
int n=sc.nextInt();
if(n%4==0){
System.out.println("Good");
}
else if(n%4!=0){
System.out.println("Not Good");
}
}
}
}
In our experience, we suggest you solve this Good Program CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the Good Program CodeChef Solution
I hope this Good Program CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>