結果
問題 | No.1663 Maximum Remainder |
ユーザー | umezo |
提出日時 | 2021-09-03 22:35:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 89 ms / 2,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 2,041 ms |
コンパイル使用メモリ | 192,148 KB |
最終ジャッジ日時 | 2025-01-24 06:24:47 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int a,b,c,d,m; cin>>a>>b>>c>>d>>m; int ma=0; for(int i=a;i<=b;i++){ for(int j=c;j<=d;j++){ ma=max(ma,(i+j)%m); } } cout<<ma<<endl; return 0; }