結果

問題 No.1926 Sequence of Remainders
ユーザー tassei903tassei903
提出日時 2022-05-06 21:39:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 590 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 78,568 KB
最終ジャッジ日時 2023-09-20 02:32:35
合計ジャッジ時間 8,840 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,536 KB
testcase_01 AC 139 ms
78,568 KB
testcase_02 AC 138 ms
78,536 KB
testcase_03 AC 138 ms
78,428 KB
testcase_04 AC 138 ms
78,480 KB
testcase_05 AC 139 ms
78,372 KB
testcase_06 AC 149 ms
77,940 KB
testcase_07 AC 155 ms
78,036 KB
testcase_08 AC 157 ms
77,904 KB
testcase_09 AC 146 ms
78,032 KB
testcase_10 AC 149 ms
77,956 KB
testcase_11 AC 156 ms
78,120 KB
testcase_12 AC 155 ms
78,076 KB
testcase_13 AC 150 ms
77,896 KB
testcase_14 AC 151 ms
77,936 KB
testcase_15 AC 147 ms
78,032 KB
testcase_16 AC 147 ms
78,016 KB
testcase_17 AC 150 ms
77,820 KB
testcase_18 AC 155 ms
78,180 KB
testcase_19 AC 150 ms
77,872 KB
testcase_20 AC 155 ms
78,016 KB
testcase_21 AC 152 ms
78,016 KB
testcase_22 AC 147 ms
77,828 KB
testcase_23 AC 149 ms
77,852 KB
testcase_24 AC 150 ms
78,004 KB
testcase_25 AC 149 ms
77,956 KB
testcase_26 AC 152 ms
77,904 KB
testcase_27 AC 159 ms
77,892 KB
testcase_28 AC 154 ms
77,912 KB
testcase_29 AC 154 ms
77,836 KB
testcase_30 AC 153 ms
77,888 KB
testcase_31 AC 152 ms
78,044 KB
testcase_32 AC 154 ms
77,736 KB
testcase_33 AC 151 ms
77,904 KB
testcase_34 AC 150 ms
77,780 KB
testcase_35 AC 155 ms
77,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

for i in range(ni()):
    n,m,k= na()
    z = m-n
    y = k
    while m >= z:
        y %= m
        m = y
    print(y)
    """a = m%k
    for i in range(n):
        a = a % (m-i-1)
    #print(a)
    if a != y:
        print(n,m,k)
"""
0