結果
| 問題 |
No.2681 ゲームセンターの両替
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-04-02 17:04:45 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 711 bytes |
| コンパイル時間 | 7,909 ms |
| コンパイル使用メモリ | 171,436 KB |
| 実行使用メモリ | 188,972 KB |
| 最終ジャッジ日時 | 2025-04-02 17:04:55 |
| 合計ジャッジ時間 | 10,411 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 5 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (135 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string[] coinMoney = Console.ReadLine().Split(' ');
if (int.Parse(coinMoney[1])/100 < int.Parse(coinMoney[0]))
{
Console.WriteLine("can't exchange");
}
else
{
if(int.Parse(coinMoney[0]) < 5)
{
Console.WriteLine("no exchange");
}else
{
int remaining = int.Parse(coinMoney[1]) - (int.Parse(coinMoney[0]) * 100);
Console.WriteLine(int.Parse(coinMoney[0]) + (remaining %500/100));
}
}
}
}
Maeda