結果
問題 | No.988 N×Mマス計算(総和) |
ユーザー | Maboy |
提出日時 | 2021-06-28 06:34:32 |
言語 | Swift (5.10.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 1,522 ms |
コンパイル使用メモリ | 135,348 KB |
実行使用メモリ | 17,796 KB |
最終ジャッジ日時 | 2023-09-07 18:13:12 |
合計ジャッジ時間 | 6,136 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
17,796 KB |
testcase_01 | AC | 3 ms
8,132 KB |
testcase_02 | AC | 4 ms
8,216 KB |
testcase_03 | AC | 3 ms
8,220 KB |
testcase_04 | AC | 3 ms
8,224 KB |
testcase_05 | AC | 4 ms
8,148 KB |
testcase_06 | AC | 3 ms
8,200 KB |
testcase_07 | AC | 3 ms
8,188 KB |
testcase_08 | AC | 3 ms
8,300 KB |
testcase_09 | AC | 3 ms
8,244 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
let n = readLine()!.split(separator: " ").map{Int($0)!} let m = readLine()!.split(separator: " ") let o = m[0] let h = m[1...].map{Int($0)!} var v = [Int]() for _ in 0..<n[0]{ v += [Int(readLine()!)!] } var t = 0 for i in v{ for j in h{ t += (o == "+" ? i+j : i*j) t %= n[2] } } print(t)