結果
| 問題 |
No.1663 Maximum Remainder
|
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2021-09-03 21:21:58 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 253 bytes |
| コンパイル時間 | 1,814 ms |
| コンパイル使用メモリ | 28,672 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-15 09:34:31 |
| 合計ジャッジ時間 | 1,588 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#include<stdio.h>
int main()
{
int a, b, c, d, m;
scanf("%d %d %d %d %d", &a, &b, &c, &d, &m);
int ans = 0, x, y;
for (x = a; x <= b; x++)
for (y = c; y <= d; y++)
if (ans < (x + y) % m)
ans = (x + y) % m;
printf("%d\n", ans);
return 0;
}
pengin_2000