Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

<time.h>呀, 真是搞不懂你

Posted by tzkq at 2010-07-09 05:41:27 on Problem 2080
In Reply To:调用标准库<time.h>函数,为什么还是WA?不解! Posted by:nanhuacrab at 2007-10-07 13:04:06
在gcc下,终于找到了_gmtime64, 处理的数据为int64, 但是仍然错误,为什么呢?

搞不懂搞不懂。

#include<stdio.h>
#include<time.h>
__int64 t,d,k=946742400;
char s[55];
int main(){
	for(;scanf("%lld",&d)&&0<=d;){
		t=k+3600*24*d;
		strftime(s,55,"%Y-%m-%d %A",_gmtime64(&t));
		puts(s);
	}

	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator