fork download
  1. #include <stdio.h>
  2.  
  3. //problem link:https://c...content-available-to-author-only...s.com/group/MWSDmqGsZm/contest/219158/problem/T
  4. //verdict : accepted
  5. //language : submitted in C
  6.  
  7. int main()
  8. {
  9. long long int a, b, c, mx, mn, md;
  10. scanf("%lld %lld %lld", &a, &b, &c);
  11.  
  12. /// if a>=b and a>=c then a is maximum
  13. /// right??
  14.  
  15. if(a>=b && a>=c ){
  16. mx = a;
  17. }
  18. if(b>=a && b>=c ){
  19. mx = b;
  20. }
  21. if(c>=a && c>= b){
  22. mx = c;
  23. }
  24.  
  25. /// now find minimum
  26. if(a<=b && a<=c ){
  27. mn = a;
  28. }
  29. if(b<=a && b<=c ){
  30. mn = b;
  31. }
  32. if(c<=a && c<= b){
  33. mn = c;
  34. }
  35.  
  36. ///now find mid value
  37. if((a>=b && b>=c) || (c>=b && b>=a)){
  38. md =b;
  39. }
  40. if((b>=a && a>=c) || (c>=a && a>=b)){
  41. md = a;
  42. }
  43. if((a>=c && c>=b)||( b>=c && c>=a)){
  44. md = c;
  45. }
  46.  
  47. printf("%lld\n%lld\n%lld\n\n", mn, md, mx);
  48. printf("%lld\n%lld\n%lld\n",a,b,c);
  49.  
  50. }
  51.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
0
23217124432672
94592855053328

23217124432672
0
94592855053328