結果
問題 |
No.988 N×Mマス計算(総和)
|
ユーザー |
![]() |
提出日時 | 2025-04-02 09:09:49 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 958 bytes |
コンパイル時間 | 8,434 ms |
コンパイル使用メモリ | 168,916 KB |
実行使用メモリ | 43,500 KB |
最終ジャッジ日時 | 2025-04-02 09:10:03 |
合計ジャッジ時間 | 12,757 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 4 TLE * 1 -- * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (116 ミリ秒)。 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[] numList = Console.ReadLine().Split(' '); string[] horizontal = Console.ReadLine().Split(' '); long result = 0; string symble = horizontal[0]; for(int i = 0; i < int.Parse(numList[0]); i++) { int vertical = int.Parse(Console.ReadLine()); for(int j = 1; j <= int.Parse(numList[1]); j++) { long ans = 0; if (symble == "+") { ans = vertical + int.Parse(horizontal[j]); } else if (symble == "*") { ans = vertical * int.Parse(horizontal[j]); } result += ans; } } Console.WriteLine(result % int.Parse(numList[2])); } }