Created
December 9, 2023 13:14
-
-
Save Sangharshvmore/c16d74df014b89c6dcf8d3d688f64e18 to your computer and use it in GitHub Desktop.
code force team problem java solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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