Accepted
Code
#include <stdio.h>
long long int __gcd(long long int a, long long int b)
{
return b == 0 ? a : __gcd(b, a % b);
}
int main()
{
long long int t, i, a, b, gcd;
scanf("%lld", &t);
for (i = 1; i <= t; i++) {
scanf("%lld %lld", &a, &b);
gcd = __gcd(a, b);
printf("Game #%lld: %lld / %lld\n", i, b / gcd, a / gcd);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1001 Achievement-Unlocked
- Language
- C11 (GCC 13.2.0)
- Submit At
- 2024-05-06 14:36:12
- Judged At
- 2024-11-11 03:35:34
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 408.0 KiB