fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int x=49,n,a,b,d;
  5. char c;
  6.  
  7. int main(){
  8. cin>>n>>a>>b>>d;
  9. if(a>0){
  10. if(a==1){
  11. c = x+'0';
  12. cout<<char(toupper(c));
  13. }else if(a>1){
  14. for(int i=0;i<=a;i++){
  15. x=x+i;
  16. c = x+'0';
  17. cout<<char(toupper(c));
  18. }
  19. }
  20. if(b==1){
  21. x++;
  22. c = x+'0';
  23. cout<<char(tolower(c));
  24. }else if(b>1){
  25. for(int i=1;i<=b;i++){
  26. x=x+i;
  27. c = x+'0';
  28. cout<<char(tolower(c));
  29. }
  30. }
  31. x=48;
  32. if(d==1){
  33. c = x+'0';
  34. cout<<c;
  35. }else if(d>1){
  36. for(int i=0;i<=d;i++){
  37. x=x+1;
  38. c = x+'0';
  39. cout<<c;
  40. }
  41. }
  42. }
  43. return 0;
  44. }
Success #stdin #stdout 0.01s 5388KB
stdin
8
2 5 1
stdout
ABDegjns`