結果
| 問題 | No.3388 Sum of Function |
| コンテスト | |
| ユーザー |
Germanium32
|
| 提出日時 | 2025-11-20 18:07:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 369 bytes |
| コンパイル時間 | 1,635 ms |
| コンパイル使用メモリ | 194,748 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-11-28 20:54:54 |
| 合計ジャッジ時間 | 2,620 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b; cin>>a>>b;
int ans=0;
for(int i=a; i<b+1; i++){
if(i==2){
ans+=7;
}
else if(i==3){
ans+=22;
}
else if(i==5){
ans+=106;
}
else if(i==7){
ans+=302;
}
else{
if(i%2!=0 && i%3!=0){
if(i%5!=0 && i%7!=0){
ans+=i*i*i-i*i+i+1;
}
}
}
}
cout<<ans<<endl;
}
Germanium32