結果
問題 |
No.2758 RDQ
|
ユーザー |
|
提出日時 | 2024-07-06 14:31:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 1,377 ms |
コンパイル使用メモリ | 169,028 KB |
実行使用メモリ | 17,336 KB |
最終ジャッジ日時 | 2024-07-06 14:31:29 |
合計ジャッジ時間 | 8,092 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) int main() { int N, Q; cin >> N >> Q; vector<int> A(N); rep(i, N) { cin >> A[i]; } rep(i, Q) { int L, R, K; cin >> L >> R >> K; int n = 0; for (int j = L-1; j < R; j++) { if (A[j] % K == 0) n += 1; } cout << n << endl; } return 0; }