結果
| 問題 | No.2850 Make Slimes |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-09 09:29:03 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 2,000 ms |
| コード長 | 1,201 bytes |
| 記録 | |
| コンパイル時間 | 8,025 ms |
| コンパイル使用メモリ | 169,560 KB |
| 実行使用メモリ | 187,112 KB |
| 最終ジャッジ日時 | 2025-12-09 09:29:14 |
| 合計ジャッジ時間 | 10,089 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (106 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System.Numerics;
public class Program
{
public static void Main()
{
//BigInteger num = BigInteger.Parse(Console.ReadLine() ?? string.Empty);
//int num = int.Parse(Console.ReadLine() ?? string.Empty);
string[] str = (Console.ReadLine() ?? string.Empty).Trim().Split(' ');
//string str = Console.ReadLine() ?? string.Empty;
int a = int.Parse(str[0]);
int b = int.Parse(str[1]);
int c = int.Parse(str[2]);
int d = int.Parse(str[3]);
if(a > c||b > d)
{
Console.WriteLine(0);
}
else if(a!=0&&a ==c || b!=0&&b ==d)
{
Console.WriteLine(1);
}
else
{
if(a==0)
{
Console.WriteLine(d / b);
return;
}
else if(b==0)
{
Console.WriteLine(c / a);
return;
}
int e = c / a;
int f = d / b;
if(e > f)
{
Console.WriteLine(f);
}
else
{
Console.WriteLine(e);
}
}
}
}