結果
| 問題 |
No.1940 Escape through + -
|
| ユーザー |
Maeda
|
| 提出日時 | 2025-04-10 09:33:33 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 763 bytes |
| コンパイル時間 | 7,791 ms |
| コンパイル使用メモリ | 173,864 KB |
| 実行使用メモリ | 206,648 KB |
| 最終ジャッジ日時 | 2025-04-10 09:33:44 |
| 合計ジャッジ時間 | 10,032 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (126 ミリ秒)。 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[] str = Console.ReadLine().Split(' ');
string[] numList = Console.ReadLine().Split(' ');
decimal judgeNum = RemainderScore(numList, decimal.Parse(str[2]));
if (judgeNum != 0 && judgeNum % decimal.Parse(str[1]) != 0)
{
Console.WriteLine("No");
}
else
{
Console.WriteLine("Yes");
}
}
private static decimal RemainderScore(string[] numList, decimal v)
{
for(int i = 0; i < numList.Length; i++)
{
v -= decimal.Parse(numList[i]);
}
return v;
}
}
Maeda