結果
問題 | No.1663 Maximum Remainder |
ユーザー |
|
提出日時 | 2021-09-03 21:26:23 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 65 ms / 2,000 ms |
コード長 | 741 bytes |
コンパイル時間 | 2,869 ms |
コンパイル使用メモリ | 109,796 KB |
実行使用メモリ | 22,400 KB |
最終ジャッジ日時 | 2024-12-15 09:47:31 |
合計ジャッジ時間 | 4,613 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Text.RegularExpressions;namespace yukicoder_contest_312{class Program{static void Main(string[] args){string[] input = Regex.Split(Console.ReadLine(), "[ ]");int a = int.Parse(input[0]);int b = int.Parse(input[1]);int c = int.Parse(input[2]);int d = int.Parse(input[3]);int m = int.Parse(input[4]);int output = 0;for (int x = a; x <= b; x++){for (int y = c; y <= d; y++){if ((x + y) % m > output) output = (x + y) % m;}}Console.WriteLine(output);}}}