結果
問題 |
No.3179 3 time mod
|
ユーザー |
|
提出日時 | 2025-06-14 14:32:22 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 3,189 ms |
コンパイル使用メモリ | 281,492 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-06-14 14:32:26 |
合計ジャッジ時間 | 4,354 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 42 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/math> using namespace std; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); long long N, P, Q, R, A, B, C; cin >> N >> P >> Q >> R >> A >> B >> C; long long t = atcoder::crt({A,B,C},{P,Q,R}).first; if(t > N) { cout << 0 << "\n"; return 0; } long long k = (N - t) / P; k /= Q, k /= R; cout << k + 1 << "\n"; }