結果

問題 No.3773 mod A > mod B
コンテスト
ユーザー Yomenashi⭐
提出日時 2026-10-23 22:19:04
言語 C++23(gcc16)
(gcc 16.2.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 845µs
コード長 1,122 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,229 ms
コンパイル使用メモリ 386,264 KB
実行使用メモリ 9,848 KB
最終ジャッジ日時 2026-10-23 22:19:14
合計ジャッジ時間 8,352 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge6_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//このコード内の一部、およびすべてを引用して提出する行為を全面的に許可します
//#define _GLIBCXX_DEBUG
//提出の際、上の行はコメントアウトすること
/*
関数ライブラリ参考URL
https://atcoder.jp/contests/iroha2019-day3/submissions/80042489
*/
/*
初期コード参考URL
https://atcoder.jp/contests/iroha2019-day3/submissions/80042515
*/
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
#define rep(a,b) for(ll a=0;a<b;a++)
#define rrep(a,b) for(ll a=b-1;a>=0;a--)
const long double pai=3.14159265358979323;
using Pair = pair<ll,ll>;
#define MOD 998244353
#define INF 1000000000000000000
#define MINF -1000000000000000000
using vll = vector<ll>;
using vvll = vector<vll>;
using vbool = vector<bool>;
using vstring = vector<string>;
#include <atcoder/all>
using namespace atcoder;
using mint=modint998244353;


int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll N,A,B;
    cin>>N>>A>>B;
    ll ans=0;
    for(ll i=1;i<=N;i++){
        if((i%A)>(i%B)){ans++;}
    }

    cout<<ans<<endl;
    
}
0