結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー moon17moon17
提出日時 2024-02-23 23:48:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 691 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 76,128 KB
最終ジャッジ日時 2024-02-23 23:48:29
合計ジャッジ時間 9,449 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,204 KB
testcase_01 AC 544 ms
75,892 KB
testcase_02 AC 544 ms
75,892 KB
testcase_03 AC 545 ms
75,892 KB
testcase_04 AC 549 ms
75,892 KB
testcase_05 AC 691 ms
76,128 KB
testcase_06 AC 672 ms
76,128 KB
testcase_07 AC 122 ms
76,000 KB
testcase_08 AC 120 ms
75,872 KB
testcase_09 AC 87 ms
75,744 KB
testcase_10 AC 90 ms
75,744 KB
testcase_11 AC 36 ms
53,204 KB
testcase_12 AC 37 ms
53,204 KB
testcase_13 AC 90 ms
71,680 KB
testcase_14 AC 83 ms
71,312 KB
testcase_15 AC 78 ms
71,492 KB
testcase_16 AC 85 ms
71,344 KB
testcase_17 AC 97 ms
71,888 KB
testcase_18 AC 80 ms
71,328 KB
testcase_19 AC 96 ms
71,968 KB
testcase_20 AC 126 ms
74,008 KB
testcase_21 AC 90 ms
72,352 KB
testcase_22 AC 92 ms
71,784 KB
testcase_23 AC 127 ms
73,912 KB
testcase_24 AC 128 ms
74,040 KB
testcase_25 AC 128 ms
74,040 KB
testcase_26 AC 128 ms
73,912 KB
testcase_27 AC 127 ms
73,912 KB
testcase_28 AC 127 ms
73,912 KB
testcase_29 AC 124 ms
73,912 KB
testcase_30 AC 127 ms
73,912 KB
testcase_31 AC 125 ms
73,912 KB
testcase_32 AC 124 ms
73,912 KB
testcase_33 AC 123 ms
73,912 KB
testcase_34 AC 558 ms
75,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys;sys.set_int_max_str_digits(0)
for _ in range(int(input())):
  n,m=map(int,input().split())
  if n%2:
    n1=n%m
    n2=(n+1)//2%m
  else:
    n1=n//2%m
    n2=(n+1)%m
  print(n1*n2%m)
0