Submission #544682

#TimeUsernameProblemLanguageResultExecution timeMemory
544682pokmui9909방 배정하기 (KOI17_room)C++17
100 / 100
28 ms332 KiB
#include <string> #include <iostream> #include <algorithm> #include <queue> #include <stack> #include <vector> #include <deque> #include <functional> #include <climits> using namespace std; int main() { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); int a, b, c, n; cin >> a >> b >> c >> n; for (int i = 0; i <= n; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= n; k++) { if (a*i + b * j + k * c == n) { cout << 1; return 0; } } } } cout << 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...