結果
問題 |
No.825 賢いお買い物
|
ユーザー |
![]() |
提出日時 | 2025-04-08 11:37:15 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 785 bytes |
コンパイル時間 | 7,473 ms |
コンパイル使用メモリ | 169,464 KB |
実行使用メモリ | 186,872 KB |
最終ジャッジ日時 | 2025-04-08 11:37:26 |
合計ジャッジ時間 | 9,799 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 16 WA * 3 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /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/
ソースコード
class Program { static void Main(string[] args) { string[] coinList = Console.ReadLine().Split(' '); if (int.Parse(coinList[2]) >= int.Parse(coinList[0]) + int.Parse(coinList[1])) { Console.WriteLine("Impossible"); } else { int oneCoin = int.Parse(coinList[0]); int tenCoin = int.Parse(coinList[1]); int useCoin = (oneCoin+tenCoin) - int.Parse(coinList[2]); int useMoney = oneCoin; useCoin -= useMoney; if (useCoin > 0) { useMoney += useCoin * 10; } Console.WriteLine(useMoney); } } }