message stringlengths 2 22.8k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 16 109k | cluster float64 1 1 | __index_level_0__ int64 32 217k |
|---|---|---|---|---|---|
Provide a correct Python 3 solution for this coding contest problem.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special ticket. With this ticket, she can take the bus for half the ... | instruction | 0 | 87,372 | 1 | 174,744 |
"Correct Solution:
```
print(eval(input().replace(" ","*2+"))//2)
``` | output | 1 | 87,372 | 1 | 174,745 |
Provide a correct Python 3 solution for this coding contest problem.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special ticket. With this ticket, she can take the bus for half the ... | instruction | 0 | 87,373 | 1 | 174,746 |
"Correct Solution:
```
a,b=map(int,input().split())
print(round(a+round(b/2)))
``` | output | 1 | 87,373 | 1 | 174,747 |
Provide a correct Python 3 solution for this coding contest problem.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special ticket. With this ticket, she can take the bus for half the ... | instruction | 0 | 87,374 | 1 | 174,748 |
"Correct Solution:
```
X, Y = (int(i) for i in input().split())
print(X+Y//2)
``` | output | 1 | 87,374 | 1 | 174,749 |
Provide a correct Python 3 solution for this coding contest problem.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special ticket. With this ticket, she can take the bus for half the ... | instruction | 0 | 87,375 | 1 | 174,750 |
"Correct Solution:
```
ab,bc=map(int,input().split())
print(int(ab+bc/2))
``` | output | 1 | 87,375 | 1 | 174,751 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,376 | 1 | 174,752 |
Yes | output | 1 | 87,376 | 1 | 174,753 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,377 | 1 | 174,754 |
Yes | output | 1 | 87,377 | 1 | 174,755 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,378 | 1 | 174,756 |
Yes | output | 1 | 87,378 | 1 | 174,757 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,379 | 1 | 174,758 |
Yes | output | 1 | 87,379 | 1 | 174,759 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,380 | 1 | 174,760 |
No | output | 1 | 87,380 | 1 | 174,761 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,381 | 1 | 174,762 |
No | output | 1 | 87,381 | 1 | 174,763 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,382 | 1 | 174,764 |
No | output | 1 | 87,382 | 1 | 174,765 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a train going from Station A to Station B that costs X yen (the currency of Japan).
Also, there is a bus going from Station B to Station C that costs Y yen.
Joisino got a special tick... | instruction | 0 | 87,383 | 1 | 174,766 |
No | output | 1 | 87,383 | 1 | 174,767 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Masha lives in a country with n cities numbered from 1 to n. She lives in the city number 1.
There is a direct train route between each pair of distinct cities i and j, where i ≠ j. In total t... | instruction | 0 | 87,712 | 1 | 175,424 |
No | output | 1 | 87,712 | 1 | 175,425 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Masha lives in a country with n cities numbered from 1 to n. She lives in the city number 1.
There is a direct train route between each pair of distinct cities i and j, where i ≠ j. In total t... | instruction | 0 | 87,713 | 1 | 175,426 |
No | output | 1 | 87,713 | 1 | 175,427 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Masha lives in a country with n cities numbered from 1 to n. She lives in the city number 1.
There is a direct train route between each pair of distinct cities i and j, where i ≠ j. In total t... | instruction | 0 | 87,714 | 1 | 175,428 |
No | output | 1 | 87,714 | 1 | 175,429 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Masha lives in a country with n cities numbered from 1 to n. She lives in the city number 1.
There is a direct train route between each pair of distinct cities i and j, where i ≠ j. In total t... | instruction | 0 | 87,715 | 1 | 175,430 |
No | output | 1 | 87,715 | 1 | 175,431 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After Santa Claus and his assistant Elf delivered all the presents and made all the wishes come true, they returned to the North Pole and found out that it is all covered with snow. Both of them... | instruction | 0 | 87,781 | 1 | 175,562 |
No | output | 1 | 87,781 | 1 | 175,563 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After Santa Claus and his assistant Elf delivered all the presents and made all the wishes come true, they returned to the North Pole and found out that it is all covered with snow. Both of them... | instruction | 0 | 87,782 | 1 | 175,564 |
No | output | 1 | 87,782 | 1 | 175,565 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After Santa Claus and his assistant Elf delivered all the presents and made all the wishes come true, they returned to the North Pole and found out that it is all covered with snow. Both of them... | instruction | 0 | 87,783 | 1 | 175,566 |
No | output | 1 | 87,783 | 1 | 175,567 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After Santa Claus and his assistant Elf delivered all the presents and made all the wishes come true, they returned to the North Pole and found out that it is all covered with snow. Both of them... | instruction | 0 | 87,784 | 1 | 175,568 |
No | output | 1 | 87,784 | 1 | 175,569 |
Provide a correct Python 3 solution for this coding contest problem.
There are N towns in JOI, which are connected by M bidirectional roads. There are shopping malls in K towns, and the people go to one of those towns through the road to shop.
Depending on the location of your home, you may have to travel long distan... | instruction | 0 | 88,301 | 1 | 176,602 |
"Correct Solution:
```
from heapq import heappop as pop
from heapq import heappush as push
def solve():
INF = 10 ** 18
class edge:
def __init__(self, to, cost):
self.to = to
self.cost = cost
N, M, K = map(int,input().split())
G = [[] for i in range(N)]
#G[i]...頂点iからの辺list、(行き先、コスト... | output | 1 | 88,301 | 1 | 176,603 |
Provide a correct Python 3 solution for this coding contest problem.
There are N towns in JOI, which are connected by M bidirectional roads. There are shopping malls in K towns, and the people go to one of those towns through the road to shop.
Depending on the location of your home, you may have to travel long distan... | instruction | 0 | 88,302 | 1 | 176,604 |
"Correct Solution:
```
from heapq import heappop as pop
from heapq import heappush as push
INF = 10 ** 18
class edge:
def __init__(self, to, cost):
self.to = to
self.cost = cost
#V, E, r = map(int,input().split())
N, M, K = map(int,input().split())
G = [[] for i in range(N)]
#G[i]...頂点iからの辺list、(行き先、コスト)
... | output | 1 | 88,302 | 1 | 176,605 |
Provide a correct Python 3 solution for this coding contest problem.
There are N towns in JOI, which are connected by M bidirectional roads. There are shopping malls in K towns, and the people go to one of those towns through the road to shop.
Depending on the location of your home, you may have to travel long distan... | instruction | 0 | 88,303 | 1 | 176,606 |
"Correct Solution:
```
# -*- coding: utf-8 -*-
"""
Shopping in JOI Kingdom
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0562
"""
import sys
from heapq import heappush, heappop
from itertools import combinations
def dijkstra(adj, s):
WHITE, GRAY, BLACK = 0, 1, 2
color = [WHITE] * len(adj)
d = ... | output | 1 | 88,303 | 1 | 176,607 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Berkomnadzor — Federal Service for Supervision of Communications, Information Technology and Mass Media — is a Berland federal executive body that protects ordinary residents of Berland from the threats of modern internet.
Berkomnadzor main... | instruction | 0 | 88,388 | 1 | 176,776 |
Tags: data structures, greedy
Correct Solution:
```
#!/usr/bin/env python3
# Copied solution
import collections
import sys
import traceback
class Input(object):
def __init__(self):
self.fh = sys.stdin
def next_line(self):
while True:
line = sys.stdin.readline()
if line... | output | 1 | 88,388 | 1 | 176,777 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Berkomnadzor — Federal Service for Supervision of Communications, Information Technology and Mass Media — is a Berland federal executive body that protects ordinary residents of Berland from the... | instruction | 0 | 88,389 | 1 | 176,778 |
No | output | 1 | 88,389 | 1 | 176,779 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Berkomnadzor — Federal Service for Supervision of Communications, Information Technology and Mass Media — is a Berland federal executive body that protects ordinary residents of Berland from the... | instruction | 0 | 88,390 | 1 | 176,780 |
No | output | 1 | 88,390 | 1 | 176,781 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,575 | 1 | 177,150 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
import sys
from math import ceil, gcd
from collections import deque
input = sys.stdin.buffer.readline
# def print(val):
# sys.stdout.write(str(val) + '\n')
n, m = [int(i) for i in input().split()]
adj = [[] for i... | output | 1 | 88,575 | 1 | 177,151 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,576 | 1 | 177,152 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
from sys import stdin
n,m = map(int,stdin.readline().split())
lis = [ [] for i in range(n) ]
for i in range(m):
u,v,t = map(int,stdin.readline().split())
u -= 1
v -= 1
lis[v].append((u,t))
from... | output | 1 | 88,576 | 1 | 177,153 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,577 | 1 | 177,154 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
import io
import os
import sys
import math
from typing import NamedTuple
from collections import deque
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
fileno = sys.stdin.fileno()
input ... | output | 1 | 88,577 | 1 | 177,155 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,578 | 1 | 177,156 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
import sys
sys.setrecursionlimit(10**5)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): ret... | output | 1 | 88,578 | 1 | 177,157 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,579 | 1 | 177,158 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
import sys
input = sys.stdin.readline
from collections import deque
#put in, get out and pop
G = list()
vis = []
col = []
dis = []
def bfs(s):
q = deque([s])
q.append(s)
vis = [0]*(s+1)
col = [-1]*(s... | output | 1 | 88,579 | 1 | 177,159 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,580 | 1 | 177,160 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
import sys;input=sys.stdin.readline
N, M = map(int, input().split())
d = [set() for _ in range(N+1)]
for _ in range(M):
u, v, t = map(int, input().split())
d[v].add((u, t))
s = [-1]*(N+1)
s[N] = 1
from colle... | output | 1 | 88,580 | 1 | 177,161 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,581 | 1 | 177,162 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
from sys import stdin
n,m = map(int,stdin.readline().split())
lis = [ [] for i in range(n) ]
for i in range(m):
u,v,t = map(int,stdin.readline().split())
u -= 1
v -= 1
lis[v].append((u,t))
from... | output | 1 | 88,581 | 1 | 177,163 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are connected by m directed roads without any additiona... | instruction | 0 | 88,582 | 1 | 177,164 |
Tags: constructive algorithms, dfs and similar, dp, graphs, greedy, shortest paths
Correct Solution:
```
import sys
input = sys.stdin.readline
from collections import deque
n, m = map(int, input().split());back = [[] for i in range(n)]
for _ in range(m):u, v, w = map(int, input().split());u -= 1;v -= 1;back[v].append((... | output | 1 | 88,582 | 1 | 177,165 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,583 | 1 | 177,166 |
Yes | output | 1 | 88,583 | 1 | 177,167 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,584 | 1 | 177,168 |
Yes | output | 1 | 88,584 | 1 | 177,169 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,585 | 1 | 177,170 |
Yes | output | 1 | 88,585 | 1 | 177,171 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,586 | 1 | 177,172 |
Yes | output | 1 | 88,586 | 1 | 177,173 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,587 | 1 | 177,174 |
No | output | 1 | 88,587 | 1 | 177,175 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,588 | 1 | 177,176 |
No | output | 1 | 88,588 | 1 | 177,177 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,589 | 1 | 177,178 |
No | output | 1 | 88,589 | 1 | 177,179 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.
There are n cities in the republic, some of them are conn... | instruction | 0 | 88,590 | 1 | 177,180 |
No | output | 1 | 88,590 | 1 | 177,181 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One day Greg and his friends were walking in the forest. Overall there were n people walking, including Greg. Soon he found himself in front of a river. The guys immediately decided to get across the river. Luckily, there was a boat by the r... | instruction | 0 | 88,716 | 1 | 177,432 |
Tags: combinatorics, dp, graphs, shortest paths
Correct Solution:
```
from collections import deque
n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
c50 = sum([1 for i in a if i == 50])
c100 = sum([1 for i in a if i == 100])
c = [[0] * 51 for i in range(51)]
c[0][0] = 1
c[1][0] = 1
c[1][1... | output | 1 | 88,716 | 1 | 177,433 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day Greg and his friends were walking in the forest. Overall there were n people walking, including Greg. Soon he found himself in front of a river. The guys immediately decided to get acros... | instruction | 0 | 88,717 | 1 | 177,434 |
No | output | 1 | 88,717 | 1 | 177,435 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It's election time in Berland. The favorites are of course parties of zublicanes and mumocrates. The election campaigns of both parties include numerous demonstrations on n main squares of the c... | instruction | 0 | 88,849 | 1 | 177,698 |
No | output | 1 | 88,849 | 1 | 177,699 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It's election time in Berland. The favorites are of course parties of zublicanes and mumocrates. The election campaigns of both parties include numerous demonstrations on n main squares of the c... | instruction | 0 | 88,850 | 1 | 177,700 |
No | output | 1 | 88,850 | 1 | 177,701 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It's election time in Berland. The favorites are of course parties of zublicanes and mumocrates. The election campaigns of both parties include numerous demonstrations on n main squares of the c... | instruction | 0 | 88,851 | 1 | 177,702 |
No | output | 1 | 88,851 | 1 | 177,703 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and Masha, who live at the different ends of the branch, each one is unaware of the other one's existence.
When Vasya has some free tim... | instruction | 0 | 88,921 | 1 | 177,842 |
Tags: implementation, math
Correct Solution:
```
from math import *
a, b = map(int, input().split())
print('Equal' if gcd(a, b) == abs(b - a) else 'Dasha' if a < b else 'Masha')
``` | output | 1 | 88,921 | 1 | 177,843 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and Masha, who live at the different ends of the branch, each one is unaware of the other one's existence.
When Vasya has some free tim... | instruction | 0 | 88,922 | 1 | 177,844 |
Tags: implementation, math
Correct Solution:
```
"""
Author : co_devil Chirag Garg
Institute : JIIT
"""
from __future__ import division, print_function
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
# from heapq import nsmallest, nlargest, heapify, #heappop ,he... | output | 1 | 88,922 | 1 | 177,845 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and Masha, who live at the different ends of the branch, each one is unaware of the other one's existence.
When Vasya has some free tim... | instruction | 0 | 88,923 | 1 | 177,846 |
Tags: implementation, math
Correct Solution:
```
a, b = map(int, input().split())
swapped = False
if b < a:
a, b = b, a
swapped = True
a_count, b_count = 0, 0
t = 0
while True:
t += b
if t % a == 0:
a_count += b - a
b_count += a
break
else:
a_count += b - t % a
... | output | 1 | 88,923 | 1 | 177,847 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.