結果

問題 No.1940 Escape through + -
ユーザー Hiroyuki Yamanouchi
提出日時 2022-05-20 23:04:39
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 502 bytes
コンパイル時間 1,411 ms
コンパイル使用メモリ 166,852 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-20 09:27:39
合計ジャッジ時間 2,551 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
// -------------------------------
// 2022/5/14 Hiroyuki Yamanouchi
// AtCoder Rating 171 10級
// -------------------------------

// 問題文

int main() {
 
    ll N,M,S;
    cin >> N >> M >> S;

    ll total = 0;
    for (int i = 0; i < N; i++){   
        ll A;
        cin >> A;
        total += A;
    }

    string ans;
    if (abs(total-S) % M == 0) ans = "Yes";
    else ans = "No";

    cout << ans << endl;

    return 0;
}
0