Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int x,n,i;
- scanf("%d",&n);
- for (i=0;i<n;i++)
- {
- scanf("%d",&x);
- while(x >= 3 && x % 7 != 0)
- x -= 3;
- if(x == 0 || x % 7 == 0)
- printf("YES\n");
- else
- printf("NO\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement