Submission #372516

#TimeUsernameProblemLanguageResultExecution timeMemory
372516gustasonOnes (LMIO17_vienetai)C++11
10 / 100
1 ms512 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll n, m, d; cin >> n >> m >> d; ll ans = 0; if (d == 1 && n % m == 0) { ans = n / m; cout << ans << "\n"; } else if (d == 3 && n % (3 * m) == 0) { ans = n * 3 + (n / (3 * m)); cout << ans << "\n"; } else if (d == 9 && n % (9 * m) == 0) { ans = n * 4 + (n / (9 * m)); cout << ans << "\n"; } else { cout << "NESIDALO\n"; } return 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...
#Verdict Execution timeMemoryGrader output
Fetching results...