Skip to content

Instantly share code, notes, and snippets.

@Sangharshvmore
Created December 9, 2023 13:14
Show Gist options
  • Select an option

  • Save Sangharshvmore/c16d74df014b89c6dcf8d3d688f64e18 to your computer and use it in GitHub Desktop.

Select an option

Save Sangharshvmore/c16d74df014b89c6dcf8d3d688f64e18 to your computer and use it in GitHub Desktop.
code force team problem java solution
import java.util.*;
public class TwohundthrityoneA {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int count =0;
for(int i=0;i<n;i++){
int idcount=0; // for indiviual dicision
int a = sc.nextInt();
if(a==1){
idcount++;
}
int b = sc.nextInt();
if(b==1){
idcount++ ;
}
int c = sc.nextInt();
if(c==1){
idcount++ ;
}
if(idcount>=2){
count++ ;
}
}
System.out.println(count);
sc.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment