Language: C

#include <stdio.h>
#include <string.h>

#define QUEUE_MAX 100005														/* ?????????????????\????????§???										*/
#define NAME_MAX 100															/* ????????????????????§???											*/
#define HEAD_INIT 1																/* ?????\???????????????????????????									*/
#define PROCESS_END 0															/* ?????????????????????											*/
#define HEAD_END 1																/* ?????\???????????????											*/
#define TAIL_END 1																/* ?????\????°??????????											*/
#define VER_INIT 0																/* ?????°?????????												*/
#define LOOP_INIT 1																/* ??????????????????????????????										*/
#define EXIT_SUCCESS 0															/* ??£?????????????????????											*/
#define NEXT_ITEM( x ) ( ( x ) + 1 )											/* ?¬????????´?													*/

static signed long judge_min( 													/* 2??????????´?????????????????°????????????????????????¢??°					*/
signed long slW_Ddata_first, 													/* ??????????±???????1											*/
signed long slW_Ddata_second );													/* ??????????±???????2											*/
static void enqueue( 															/* ?????\????°?????????¢??°											*/
Process st_queue_add );															/* ??????????±??????\????????¢?????¬???									*/
static Process dequeue( void );													/* ?????\??????????????¢??°											*/

typedef struct {
	unsigned char aubG_Dp_name[ NAME_MAX ];										/* ???????????????												*/
	signed long slG_Drem_time;													/* ????????????????????????											*/
} Process;																		/* ?????????????§???????											*/

Process st_queue[ NEXT_ITEM( QUEUE_MAX ) ];										/* ?????????????????\???											*/

unsigned long ulG_Dqueue_head = HEAD_INIT;										/* ?????\??????????????????											*/
unsigned long ulG_Dqueue_tail;													/* ?????\????°?????????????											*/
unsigned long ulG_Ddata_cnt;													/* ??????????????°?¨???¶?????°										*/

int main( void )
{
	unsigned long ulW_Dtotal_time = VER_INIT;									/* ??????????¨????????¨???¶?????°										*/
	signed long slW_Dcalc;														/* ????\???¨?????°												*/
	unsigned long ulW_Cloop_cnt;												/* ?????????????????????											*/
	unsigned long ulW_Dquantum;													/* ???????????????????????¨?????°										*/
	Process st_queue_calc;														/* ????\???¨?§???????												*/

	scanf( "%d %d", &ulG_Ddata_cnt, &ulW_Dquantum );							/* ??????????????°??¨????????????????????\???								*/
	/* ???????????\?????¨????????? */
	for( ulW_Cloop_cnt = LOOP_INIT; ulW_Cloop_cnt <= ulG_Ddata_cnt; ulW_Cloop_cnt++ ){
		/* ?????????????????¨?????????????????????????????\??? */
		scanf( "%s %d", st_queue[ ulW_Cloop_cnt ].aubG_Dp_name, &st_queue[ ulW_Cloop_cnt ].slG_Drem_time );
	}/* ???????????\?????¨?????????????????? */

	ulG_Dqueue_tail = NEXT_ITEM( ulG_Ddata_cnt );								/* ?????\????°?????????????????????????									*/
	/* ?????\????????¨?????\????°????????????§????????????????????? */
	while( ulG_Dqueue_head != ulG_Dqueue_tail ){
		st_queue_calc = dequeue();												/* ????\???¨?§???????????????\??????????????¢??°?????????????????£??\				*/
		/* ????\???¨?????°???????????????????????¨????\???¨?§????????????????????????????????°??????????????????£??\ */
		slW_Dcalc = judge_min( ulW_Dquantum, st_queue_calc.slG_Drem_time );
		st_queue_calc.slG_Drem_time -= slW_Dcalc;								/* ????\???¨?§????????????????????????????????\???¨?????°?????????				*/
		ulW_Dtotal_time += slW_Dcalc;											/* ??????????¨??????????????\???¨?????°?????????							*/
		/* ????\???¨?§????????????????????????????????????????????????§????????´??? */
		if( st_queue_calc.slG_Drem_time > PROCESS_END ){
			enqueue( st_queue_calc );											/* ?????\????°?????????¢??°???????\???¨?§???????????????????					*/
		}
		else{
			printf( "%s %d\n", st_queue_calc.aubG_Dp_name, ulW_Dtotal_time );	/* ?????????????????????????????¨????¨????????????????						*/
		}
	}/* ?????\????????¨?????\????°????????????§?????????????????????????????? */
	return EXIT_SUCCESS;
}

static signed long judge_min( 													/* 2??????????´?????????????????°????????????????????????¢??°					*/
signed long slW_Ddata_first, 													/* ??????????±???????1											*/
signed long slW_Ddata_second )													/* ??????????±???????2											*/
{
	/* ??????????±???????1????????????????±???????2???????°?????????´??? */
	if( slW_Ddata_first < slW_Ddata_second ){
		return slW_Ddata_first;													/* ??????????±???????1?????????										*/
	}
	else{
		return slW_Ddata_second;												/* ??????????±???????2?????????										*/
	}
}

static void enqueue( 															/* ?????\????°?????????¢??°											*/
Process st_queue_add )															/* ??????????±??????\????????¢?????¬???*/
{
	st_queue[ ulG_Dqueue_tail ] = st_queue_add;									/* ?????????????????\?????????????????????????´?????????????????±??????\????????£??\	*/
	/* ?????\????°????????????????????????????????????\????????§????????´??? */
	if( ulG_Dqueue_tail == QUEUE_MAX ){
		ulG_Dqueue_tail = TAIL_END;												/* ?????\????°?????????????????????????????????´							*/
	}
	else{
		ulG_Dqueue_tail++;														/* ?????\????°?????????????????????????????????????							*/
	}
}

static Process dequeue( void )													/* ?????\??????????????¢??°											*/
{
	Process st_queue_calc;														/* ????\???¨?§???????												*/

	st_queue_calc = st_queue[ ulG_Dqueue_head ];								/* ????\???¨?§???????????????\????????????????´??????????						*/
	/* ?????\??????????????????????????????????????\????????§????????´??? */
	if( ulG_Dqueue_head == QUEUE_MAX ){
		ulG_Dqueue_head = HEAD_END;												/* ?????\??????????????????????????????????????´							*/
	}
	else{
		ulG_Dqueue_head++;														/* ?????\??????????????????????????????????????????							*/
	}
	return st_queue_calc;														/* ????\???¨?§????????????????										*/
}

Compiler output:
main.c:19:1: error: unknown type name 'Process'
   19 | Process st_queue_add );                                                                                                                 /* ??????????±??????\????????¢?????¬???                                                                 */
      | ^~~~~~~
main.c:20:8: error: unknown type name 'Process'
   20 | static Process dequeue( void );                                                                                                 /* ?????\??????????????¢??°                                                                                     */
      |        ^~~~~~~
main.c: In function 'main':
main.c:51:33: error: incompatible types when assigning to type 'Process' from type 'int'
   51 |                 st_queue_calc = dequeue();                                                                                              /* ????\???¨?§???????????????\??????????????¢??°?????????????????£??\                           */
      |                                 ^~~~~~~
main.c:58:25: error: implicit declaration of function 'enqueue'; did you mean 'dequeue'? [-Wimplicit-function-declaration]
   58 |                         enqueue( st_queue_calc );                                                                                       /* ?????\????°?????????¢??°???????\???¨?§???????????????????                                    */
      |                         ^~~~~~~
      |                         dequeue
main.c: At top level:
main.c:80:13: warning: conflicting types for 'enqueue'; have 'void(Process)'
   80 | static void enqueue(                                                                                                                    /* ?????\????°?????????¢??°                                                                                     */
      |             ^~~~~~~
main.c:80:13: error: static declaration of 'enqueue' follows non-static declaration
main.c:58:25: note: previous implicit declaration of 'enqueue' with type 'void(Process)'
   58 |                         enqueue( st_queue_calc );                                                                                       /* ?????\????°?????????¢??°???????\???¨?§???????????????????                                    */
      |                         ^~~~~~~
main.c:93:16: error: conflicting types for 'dequeue'; have 'Process(void)'
   93 | static Process dequeue( void )                                                                                                  /* ?????\??????????????¢??°                                                                                     */
      |                ^~~~~~~
main.c:20:16: note: previous declaration of 'dequeue' with type 'int(void)'
   20 | static Process dequeue( void );                                                                                                 /* ?????\??????????????¢??°                                                                                     */
      |                ^~~~~~~
main.c:20:16: warning: 'dequeue' used but never defined