Advertisement
SAADQUAMER

Untitled

Jul 25th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n,i,x,s1=0,s2=0,m[100],j;
  5.     scanf("%d",&n);
  6.     {
  7.         for(i=0; i<n; i++)
  8.         {
  9.             s1=0,s2=0;
  10.             scanf("%d",&x);
  11.             {
  12.                 for(j=0; j<x; j++)
  13.                     scanf("%d",&m[j]);{
  14.                 if(m[j]=1){
  15.                     s1=s1+m[j];}
  16.                     if(s1<= 9)
  17.                         {printf("All hail to princess mAina\n %d",s1);}
  18.                     else
  19.                         printf(":'(\n");
  20.                 }
  21.                     }
  22.             }
  23.         }
  24.  
  25.  
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement