목록문제풀이 (155)
말랑한 하루
[SW Expert Academy] 1284 수도 요금 경쟁 [C++]
[ 핵심풀이 ] [ 핵심소스 ] [ C++ ] #include #pragma warning(disable:4996) using namespace std; #define endl "\n" int main() { int tc; cin >> tc; for (int t = 1; t > P >> Q >> R >> S >> W; int A = W * P; int B = Q; if (R < W) B += (W - R) * S; cout
문제풀이/SWexpert Academy
2021. 1. 20. 01:12
[SW Expert Academy] 1225 암호생성기 [C++]
[ 핵심풀이 ] [ 핵심소스 ] [ C++ ] #include #include #pragma warning(disable:4996) using namespace std; #define endl "\n" #define tap "\t" int main() { int tc; while (cin >> tc) { queue q; for (int i = 0; i > temp; q.push(temp); } int index = 0; while (!q.empty()) { index == 5 ? index = 1 : index++; int out = q.front(); q.pop(); int in = out - index; if (in
문제풀이/SWexpert Academy
2021. 1. 20. 01:10