結果
問題 | No.1663 Maximum Remainder |
ユーザー |
![]() |
提出日時 | 2021-09-07 18:25:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 925 ms |
コンパイル使用メモリ | 92,392 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-23 16:33:05 |
合計ジャッジ時間 | 1,739 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 1 |
ソースコード
#include <iostream>#include <vector>#include <algorithm>#include <functional>#include <queue>#include <map>#include <cmath>#include <iomanip>using namespace std;int main() {ios_base::sync_with_stdio(false);cin.tie(NULL);//cout << fixed << setprecision(15);int a , b , c , d , m;cin >> a >> b >> c >> d >> m;if (a + c <= m && m <= b + d) cout << m - 1 << endl;else cout << (b + d) % m << endl;return 0;}