fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5.  
  6.  
  7. int main()
  8. {
  9. int a, b, c;
  10. scanf("%d %d", &a, &b);
  11. c = 1;
  12. if (a == b) {
  13. do {
  14. if (b == 0) {
  15. printf("%dx%d", a, c);
  16. return 0;
  17. } else {
  18. c++;
  19. scanf("%d", &b);
  20. }
  21. } while ((b < 0));
  22. printf("%dx%d", a, c);
  23. } else {
  24. printf("%dx1", a);
  25. }
  26. return 0;
  27. }
  28.  
  29.  
Success #stdin #stdout 0s 9416KB
stdin
Standard input is empty
stdout
1317279376x1