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

既然puts(str)比printf("%s\n",str)高效,why we use printf to print Hello World instead of puts?

Posted by 947186602 at 2020-09-06 20:41:29 on Problem 3768 and last updated at 2020-09-06 20:42:07
可能是因为printf比puts更泛用吧......

虽然用printf是杀鸡用牛刀,但是从学习的角度来说:
printf可能做到puts做不到的很多事,对大多数人来说掌握printf
明显比了解puts要更为实用....


所以这道题我用pprintf("%s\n",str)TLE puts(str) 79ms, 确实刷新了我的认知.

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