제출 #14672

#제출 시각아이디문제언어결과실행 시간메모리
14672nosiarCATS (NOI14_cats)C++14
0 / 25
22 ms1716 KiB
#include <iostream> #include <cstring> #include <string> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <numeric> #include <limits> using namespace std; int x, l, n; int main() { #ifdef LOCAL freopen("input.txt", "r", stdin); #endif int tests; cin >> tests; while (tests--) { cin >> x >> l >> n; int k = l / (2 * n) + 1; int z; if (x == 1) z = 0; else if (x % 4 == 0) z = 0; else z = 1; cout << 2 * k*n + z << endl; }}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...