結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー i_am_noobi_am_noob
提出日時 2024-03-25 22:56:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 662 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,064 KB
最終ジャッジ日時 2024-03-25 22:56:24
合計ジャッジ時間 8,306 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 595 ms
75,728 KB
testcase_02 AC 575 ms
75,728 KB
testcase_03 AC 589 ms
75,728 KB
testcase_04 AC 569 ms
75,728 KB
testcase_05 AC 662 ms
75,728 KB
testcase_06 AC 653 ms
75,728 KB
testcase_07 AC 88 ms
75,728 KB
testcase_08 AC 84 ms
75,728 KB
testcase_09 AC 57 ms
68,688 KB
testcase_10 AC 57 ms
68,688 KB
testcase_11 AC 42 ms
59,468 KB
testcase_12 AC 41 ms
59,468 KB
testcase_13 AC 59 ms
75,860 KB
testcase_14 AC 58 ms
75,664 KB
testcase_15 AC 57 ms
75,208 KB
testcase_16 AC 61 ms
75,416 KB
testcase_17 AC 58 ms
75,708 KB
testcase_18 AC 57 ms
75,320 KB
testcase_19 AC 57 ms
75,464 KB
testcase_20 AC 58 ms
76,032 KB
testcase_21 AC 60 ms
75,524 KB
testcase_22 AC 57 ms
75,956 KB
testcase_23 AC 55 ms
76,064 KB
testcase_24 AC 55 ms
76,064 KB
testcase_25 AC 55 ms
76,064 KB
testcase_26 AC 56 ms
76,064 KB
testcase_27 AC 55 ms
76,064 KB
testcase_28 AC 55 ms
76,064 KB
testcase_29 AC 56 ms
76,064 KB
testcase_30 AC 56 ms
76,064 KB
testcase_31 AC 56 ms
76,064 KB
testcase_32 AC 56 ms
76,064 KB
testcase_33 AC 75 ms
60,736 KB
testcase_34 AC 549 ms
75,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
	s, mod = input().split()
	mod = int(mod)
	res = 0
	for i in s:
		res = (res * 10 + (ord(i) - ord('0'))) % (mod * 2)
	print((res * (res + 1) // 2) % mod)
0