Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int v,m,a;
  5. scanf("%d %d",&v,&m);
  6. scanf("%d",&a);
  7. int bullet_value[a];
  8. for(int i=0;i<a;i++)
  9. {
  10. scanf("%d",&bullet_value[i]);
  11. }
  12. int temp;
  13. for(int i=0;i<a-1;i++)
  14. {
  15. for(int j=0;j<a-i-1;j++)
  16. {
  17. if(bullet_value[j+1]<bullet_value[j])
  18. {
  19. temp=bullet_value[j];
  20. bullet_value[j]=bullet_value[j+1];
  21. bullet_value[j+1]=temp;
  22. }
  23. }
  24. }
  25. int total=(v/bullet_value[0]);
  26. if(total >= m){
  27. printf("InTLEgent Lalosha\n");
  28. }else{
  29. printf("Pora Kopal\n");
  30. }
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement