Advertisement
Avdluna

Untitled

Sep 1st, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int n,x,i,a=0,b=0;
  7.  
  8.         scanf("%d", &n);
  9.  
  10.             for(i = 0 ; i < n ; i++){
  11.  
  12.                 scanf("%d", &x);
  13.  
  14.                 if(x == 1){
  15.                     a++;
  16.                 }
  17.  
  18.                 else{
  19.                     b++;
  20.                 }
  21.             }
  22.  
  23.             if(a >= b){
  24.                 printf("N\n");
  25.             }
  26.  
  27.             else{
  28.                 printf("S\n");
  29.             }
  30.  
  31.  
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement