Submission #1925006
Source Code Expand
Copy
import math def is_prime(n): if n < 2: return False if n == 2: return True if n%2 == 0: return False for i in xrange(3, int(math.sqrt(n))+1, 2): if n%i == 0: return False return True n = input() for _ in xrange(n): s = 0 a, b = map(int, raw_input().split()) for i in xrange(a, b+1): if is_prime(i) and is_prime((i+1)/2): s += 1 print s
Submission Info
Submission Time | |
---|---|
Task | D - 2017-like Number |
User | pikachu1101 |
Language | Python (2.7.6) |
Score | 0 |
Code Size | 458 Byte |
Status | TLE |
Exec Time | 2103 ms |
Memory | 2692 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | TLE | 2103 ms | 2568 KB |
02.txt | TLE | 2103 ms | 2568 KB |
03.txt | TLE | 2103 ms | 2568 KB |
04.txt | TLE | 2103 ms | 2568 KB |
05.txt | TLE | 2103 ms | 2568 KB |
06.txt | TLE | 2103 ms | 2568 KB |
07.txt | TLE | 2103 ms | 2568 KB |
sample_01.txt | AC | 10 ms | 2568 KB |
sample_02.txt | AC | 10 ms | 2692 KB |
sample_03.txt | AC | 10 ms | 2568 KB |