結果

問題 No.3179 3 time mod
ユーザー Carpenters-Cat
提出日時 2025-06-13 21:52:34
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 318 bytes
コンパイル時間 4,016 ms
コンパイル使用メモリ 253,596 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-14 01:41:14
合計ジャッジ時間 5,207 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41 RE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:24: warning: argument 1 null where non-null expected [-Wnonnull]
   13 |         if (N < r) puts(0);
      |                    ~~~~^~~
In file included from /usr/include/c++/13/cstdio:42,
                 from /usr/include/c++/13/ext/string_conversions.h:45,
                 from /usr/include/c++/13/bits/basic_string.h:4109,
                 from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from main.cpp:1:
/usr/include/stdio.h:724:12: note: in a call to function ‘int puts(const char*)’ declared ‘nonnull’
  724 | extern int puts (const char *__s);
      |            ^~~~

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
int main () {
	ll N;
	cin >> N;
	std::vector<ll> A(3), B(3);
	for (ll& a : A) cin >> a;
	for (ll& a : B) cin >> a;
	auto [r, m] = crt(B, A);
	if (N < r) puts(0);
	else cout << (N - r) / m + 1 << endl;
}
0