fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int V ,A,B,C ;
  7. while (V>0){
  8. if (V-A>=0){
  9. V-=A;
  10. }
  11. else if (V-A<0)
  12. {
  13. cout << "F" << endl;
  14. }
  15. return 0 ;
  16. if (V-B >=0)
  17. V-=B;
  18. else if (V-B<0)
  19. {
  20. cout << "M" << endl;
  21. }
  22. return 0;
  23. if (V-C>=0)
  24. {
  25. V-=C;
  26. }
  27. else if ( V-C <0)
  28. {
  29. cout << "T" << endl;
  30. }
  31. return 0;
  32. }
  33.  
  34.  
  35.  
  36. }
  37.  
Success #stdin #stdout 0.01s 5320KB
stdin
25 10 11 12
stdout
Standard output is empty