結果

問題 No.1940 Escape through + -
ユーザー rururun
提出日時 2024-11-15 12:39:28
言語 Swift
(6.3.3)
コンパイル:
swiftc _filename_ -Ounchecked -o a.out
実行:
./a.out
結果
AC  
実行時間 43 ms / 2,000 ms
+ 256µs
コード長 242 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 14,639 ms
コンパイル使用メモリ 144,648 KB
実行使用メモリ 17,064 KB
最終ジャッジ日時 2026-09-23 06:03:39
合計ジャッジ時間 5,340 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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