#include	<stdio.h>
#include	<sys/types.h>
#include	<sys/stat.h>

struct stat s;

main(argc,argv)
register int argc;
register char **argv;
{
	int pflag = 0;

	while (--argc)
	{
		if ((**++argv == '-')&&(*(*argv+1) == 'p'))
			pflag++;
		else
		{
			stat(*argv,&s);
			if (pflag)
				printf("%s %d\n",*argv,s.st_mtime);
			else
				printf("%d\n",s.st_mtime);
		}
	}
}
