Wrong Answer
Code
#include <iostream>
#include <iomanip>
int main() {
int G;
std::cin >> G;
for (int i = 0; i < G; ++i) {
int A, U;
std::cin >> A >> U;
if (A == 0) {
continue;
}
U = std::min(U, A);
int gcd = 1;
for (int j = 1; j <= U; ++j) {
if (A % j == 0 && U % j == 0) {
gcd = j;
}
}
int numerator = U / gcd;
int denominator = A / gcd;
std::cout << "Game #" << i + 1 << ": " << numerator << " / " << denominator << std::endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1001 Achievement-Unlocked
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-06 13:22:24
- Judged At
- 2024-11-11 03:42:37
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 324.0 KiB