fork download
  1. n = int(input()) #nhập n
  2. a = dãy các số nguyên tố #tạo ra dãy các số nguyên tố
  3. dem = 0 #tạo biến đếm số siêu đẹp = 0
  4. for i in range(len(a) - 1): #Chạy i từ 1 đến len(a) - 1
  5. for j in range(i + 1, len(a)): #chạy j từ i + 1 đến len(a)
  6. if a[i] * a[j] ** 3 <= n: dem += 1 #Nếu mà a[i] * a[j] ^ 3 <= n thì dem tăng 1
  7. else: break # Else có nghĩa là a[i] * a[j] ^ 3 > n thì j tăng lên bao nhiêu nó cũng lớn nên ta phải break
  8. print(dem) #In ra số lượng số siêu đẹp
  9.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.9/py_compile.py", line 144, in compile
    code = loader.source_to_code(source_bytes, dfile or file,
  File "<frozen importlib._bootstrap_external>", line 918, in source_to_code
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "./prog.py", line 2
    a = dãy các số nguyên tố #tạo ra dãy các số nguyên tố
             ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.9/py_compile.py", line 150, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 2
    a = dãy các số nguyên tố #tạo ra dãy các số nguyên tố
             ^
SyntaxError: invalid syntax

stdout
Standard output is empty