結果

問題 No.682 Average
ユーザー wheson
提出日時 2018-05-11 22:27:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 728 bytes
コンパイル時間 2,376 ms
コンパイル使用メモリ 165,908 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 04:30:13
合計ジャッジ時間 2,170 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
//#define int long long

using namespace std;
using LL = long long;
using P = pair<int, int>;

#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)

#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()

const int INF = (int)1e9;
const LL INFL = (LL)1e15;
const int MOD = 1e9 + 7;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

/*************** using variables **************/
int a, b;
/**********************************************/

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> a >> b;
    int ans = 0;
    for(int i = a; i <= b; i++){
        if((a + b + i) % 3 == 0) ans++;
    }
    cout << ans << endl;
}
0