fork download
  1. #include <stdio.h>
  2.  
  3. #define f(x) (((x)%5)*48+((x)/5))
  4. #define g(x) (((x)%48)*5+((x)/48))
  5.  
  6. int main(void)
  7. {
  8. int arr[240], i;
  9.  
  10. for (i=0; i<240; i++) {
  11. arr[i] = i;
  12. }
  13.  
  14. for (i=0; i<240; i++) {
  15. if (g(i)%2==0) {
  16. printf("%d-%d", arr[f(g(i)+1)], arr[i]);
  17. } else {
  18. printf("%d-%d", arr[i], arr[i]);
  19. }
  20.  
  21. if (i%48!=47) {
  22. printf(",");
  23. } else printf("\n");
  24. }
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 4936KB
stdin
Standard input is empty
stdout
48-0,1-1,50-2,3-3,52-4,5-5,54-6,7-7,56-8,9-9,58-10,11-11,60-12,13-13,62-14,15-15,64-16,17-17,66-18,19-19,68-20,21-21,70-22,23-23,72-24,25-25,74-26,27-27,76-28,29-29,78-30,31-31,80-32,33-33,82-34,35-35,84-36,37-37,86-38,39-39,88-40,41-41,90-42,43-43,92-44,45-45,94-46,47-47
48-48,97-49,50-50,99-51,52-52,101-53,54-54,103-55,56-56,105-57,58-58,107-59,60-60,109-61,62-62,111-63,64-64,113-65,66-66,115-67,68-68,117-69,70-70,119-71,72-72,121-73,74-74,123-75,76-76,125-77,78-78,127-79,80-80,129-81,82-82,131-83,84-84,133-85,86-86,135-87,88-88,137-89,90-90,139-91,92-92,141-93,94-94,143-95
144-96,97-97,146-98,99-99,148-100,101-101,150-102,103-103,152-104,105-105,154-106,107-107,156-108,109-109,158-110,111-111,160-112,113-113,162-114,115-115,164-116,117-117,166-118,119-119,168-120,121-121,170-122,123-123,172-124,125-125,174-126,127-127,176-128,129-129,178-130,131-131,180-132,133-133,182-134,135-135,184-136,137-137,186-138,139-139,188-140,141-141,190-142,143-143
144-144,193-145,146-146,195-147,148-148,197-149,150-150,199-151,152-152,201-153,154-154,203-155,156-156,205-157,158-158,207-159,160-160,209-161,162-162,211-163,164-164,213-165,166-166,215-167,168-168,217-169,170-170,219-171,172-172,221-173,174-174,223-175,176-176,225-177,178-178,227-179,180-180,229-181,182-182,231-183,184-184,233-185,186-186,235-187,188-188,237-189,190-190,239-191
1-192,193-193,3-194,195-195,5-196,197-197,7-198,199-199,9-200,201-201,11-202,203-203,13-204,205-205,15-206,207-207,17-208,209-209,19-210,211-211,21-212,213-213,23-214,215-215,25-216,217-217,27-218,219-219,29-220,221-221,31-222,223-223,33-224,225-225,35-226,227-227,37-228,229-229,39-230,231-231,41-232,233-233,43-234,235-235,45-236,237-237,47-238,239-239