Advertisement
Saleh127

Untitled

Apr 22nd, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int a,b,c=0,d,e=0,f,i,j,k;
  6. cin>>b;
  7. d=b+1;
  8. while(b--)
  9. {
  10. cin>>a;
  11. c+=a;
  12. }
  13. for(i=1;i<=5;i++)
  14. {
  15. if((c+i)%d!=1)
  16. {
  17. e++;
  18. }
  19. }
  20. cout<<e<<endl;
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement