I've tried use a program which is will work in sqrt(n),but it got TLE.,please help me
http://acm.pku.edu.cn/JudgeOnline/problem?id=1811
ulyssesmn
0
Newbie Poster
Recommended Answers
Jump to PostIf you look back in this forum, the prime number problem has been discussed many, many times in just the past week.
What do you mean by "it got TLE"?
Jump to Post"TLE" means time limit error,and that integers could be at most 2^54.So with those big numbers cannot be checked out in one second!!!(Even if you've used sqrt(n)!!!)
I don't think testing a single number of that size presents a time problem. Consider that the square root of 2^54 is 2^27, …
All 5 Replies
vmanes
1,165
Posting Virtuoso
ulyssesmn
0
Newbie Poster
vmanes
1,165
Posting Virtuoso
ulyssesmn
0
Newbie Poster
vmanes
1,165
Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.