結果

問題 No.3388 Sum of Function
コンテスト
ユーザー Tuchmos
提出日時 2025-11-28 21:24:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-11-28 21:24:18
合計ジャッジ時間 1,993 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A,B=map(int,input().split())
ans=0
for n in range(A,B+1):
    ok=True
    if n==1:
        continue
    for k in range(2,n):
        if n%k==0:
            ok=False
            break
    if ok:
        ans+=n*n*n-n*n+n+1
print(ans)
0