Submission #28031440


Source Code Expand

from math import sqrt
X, Y = map(int, input().split())
cx, cy = 0, 0

for d in range(1, max(X, Y) + 1):
    cx += (X % d == 0)
    cy += (Y % d == 0)

if cx == cy:
    print('Z')
else:
    print('X' if cx > cy else 'Y')

Submission Info

Submission Time
Task D - Divisor
User n_yU
Language PyPy3 (7.3.0)
Score 7
Code Size 232 Byte
Status AC
Exec Time 104 ms
Memory 62776 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 7 / 7
Status
AC × 3
AC × 16
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, example0.txt, example1.txt, example2.txt
Case Name Status Exec Time Memory
000.txt AC 104 ms 60732 KiB
001.txt AC 81 ms 62196 KiB
002.txt AC 73 ms 62404 KiB
003.txt AC 59 ms 62592 KiB
004.txt AC 59 ms 62608 KiB
005.txt AC 69 ms 62532 KiB
006.txt AC 68 ms 62764 KiB
007.txt AC 75 ms 62776 KiB
008.txt AC 72 ms 62244 KiB
009.txt AC 68 ms 62468 KiB
010.txt AC 58 ms 62320 KiB
011.txt AC 68 ms 62556 KiB
012.txt AC 67 ms 62616 KiB
example0.txt AC 51 ms 60928 KiB
example1.txt AC 51 ms 60932 KiB
example2.txt AC 50 ms 61372 KiB