結果
問題 | No.1987 Sandglass Inconvenience |
ユーザー |
![]() |
提出日時 | 2022-07-04 12:10:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 533 ms |
コンパイル使用メモリ | 68,036 KB |
最終ジャッジ日時 | 2025-01-30 04:28:35 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <array>#include <cstdint>#include <iostream>#include <numeric>int main() {std::array<std::uint64_t, 3> abc;for (auto& e : abc) std::cin >> e;std::uint64_t X;std::cin >> X;auto gcd = std::reduce(abc.begin(), abc.end(), UINT64_C(0), [](auto a, auto b) { return std::gcd(a, b); });std::cout << (X % gcd == 0 ? "Yes" : "No") << '\n';}