結果
| 問題 | No.3388 Sum of Function |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-03 16:40:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 247 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 82,824 KB |
| 実行使用メモリ | 54,352 KB |
| 最終ジャッジ日時 | 2025-12-03 16:40:23 |
| 合計ジャッジ時間 | 2,124 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
a,b=map(int,input().split())
def f(x):
return x**3-x**2+x+1
def sum_of_function(a,b):
s=0
for i in range(a,b+1):
if i>1:
for j in range(2,i//2+1):
if i%j==0:
break
else:
s+=f(i)
return s
print(sum_of_function(a,b))