Computer Programming Contest Preparation

ToolBox - Source for: naq/2026/j.c



/home/toolbox/public_html/solutions/naq/2026/j.c
    1 #include <stdio.h>
    2 #include <string.h>
    3 #include <sys/types.h>
    4 #include <sys/stat.h>
    5 #include <fcntl.h>
    6 #include <stdlib.h>
    7 #include <math.h>
    8 #include <stdint.h>
    9 #include <ctype.h>
   10 
   11 #define TRUE  (1 == 1)
   12 #define FALSE (1 != 1)
   13 
   14 #define DEBUG if (FALSE)
   15 
   16 /* fprintf(stderr, "functionName: message", varslist); */
   17 
   18 /*
   19  *  Author: Isaac Traxler
   20  *    Date: 2026-10-03
   21  * Purpose: fun
   22  * Problem: j Regarde!
   23  */
   24 
   25 /*
   26  * This template reads data a specified number of times.
   27  */
   28 
   29 int numberOfTimes;
   30 int cnt;
   31 
   32 void init()
   33 {
   34     /* FUNCTION init */
   35     scanf("%d ", &numberOfTimes);
   36 } /* FUNCTION init */
   37 
   38 void dump()
   39 {
   40     /* FUNCTION dump */
   41 } /* FUNCTION dump */
   42 
   43 void getInput()
   44 {
   45     /* FUNCTION getInput */
   46     scanf(" %d ", &cnt);
   47 } /* FUNCTION getInput */
   48 
   49 void process()
   50 {
   51     /* FUNCTION process */
   52     int i;
   53 
   54     printf("sh");
   55     for (i=0; i<cnt; i++)
   56         {
   57             /* for each person */
   58             printf("h");
   59         } /* for each person */
   60     printf("\n");
   61 } /* FUNCTION process */
   62 
   63 int main()
   64 {
   65     /* main */
   66     int i;
   67 
   68     init();
   69     for (i=0; i<numberOfTimes; i++)
   70         {
   71             /* while */
   72             getInput();
   73             process();
   74         } /* while */
   75 
   76     return EXIT_SUCCESS;
   77 } /* main */
   78 
   79