Chef and Steps Problem Code: CHEFSTEP Codechef Solution

#include <bits/stdc++.h>
using namespace std;
int main(){
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int t;
  cin>>t;
  while(t--){
  int n,k;
  cin>>n>>k;
  while(n--){
    int c;
    cin>>c;
    if(c%k)
      cout<<0;
    else
      cout<<1;
  }
  cout<<'\n';
  }
  return 0;
}

Comments