結果
| 問題 | No.3773 mod A > mod B |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-18 13:28:10 |
| 言語 | C++23(gnu拡張gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 849µs | |
| コード長 | 762 bytes |
| 記録 | |
| コンパイル時間 | 4,818 ms |
| コンパイル使用メモリ | 356,140 KB |
| 実行使用メモリ | 9,888 KB |
| 最終ジャッジ日時 | 2026-11-18 13:28:17 |
| 合計ジャッジ時間 | 4,713 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (ll i = (a); i < (ll)(b); i++)
#define all(x) (x).begin(), (x).end()
constexpr int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
template <typename T>
bool chmin(T& a, const T& b) { return a > b ? (a = b, true) : false; }
template <typename T>
bool chmax(T& a, const T& b) { return a < b ? (a = b, true) : false; }
void solve() {
int N, A, B;
cin >> N >> A >> B;
int ans = 0;
rep(n, 1, N + 1) {
if ((n % A) > (n % B)) ans++;
}
cout << ans << '\n';
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T = 1;
// cin >> T;
while (T--) {
solve();
}
}