結果

問題 No.1940 Escape through + -
ユーザー rururun
提出日時 2024-11-15 12:39:28
言語 Swift
(6.0.3)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 10,475 ms
コンパイル使用メモリ 127,524 KB
実行使用メモリ 16,088 KB
最終ジャッジ日時 2024-11-15 12:39:41
合計ジャッジ時間 4,246 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

let nms = readLine()!.split(separator: " ").map{Int($0)!}
let (n,m,s) = (nms[0],nms[1],nms[2])
let arr = readLine()!.split(separator: " ").map{Int($0)!}
let ss = arr.reduce(0,+)
if abs(s-ss) % m == 0{
    print("Yes")
}else{
    print("No")
}
0