結果
| 問題 | No.3388 Sum of Function |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-28 22:07:07 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 507 bytes |
| コンパイル時間 | 3,677 ms |
| コンパイル使用メモリ | 275,560 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2025-11-28 22:07:51 |
| 合計ジャッジ時間 | 4,185 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | WA * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
vector<int> f;
int s[] = {2, 3, 5, 7};
long long ans = 0LL;
cin >> a >> b;
for (int i=a; i<=b; i++){
bool f = true;
for(int j=0; j<4; j++){
if (i / s[j] > 1 && i % s[j] == 0){
f = false;
break;
}
}
if (f){
ans += (long long) pow(i, 3) - pow(i, 2) + pow(i, 1) + i;
}
}
cout << ans << endl;
}