結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー t9unkubjt9unkubj
提出日時 2024-02-23 21:53:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 646 ms / 2,000 ms
コード長 364 bytes
コンパイル時間 7,253 ms
コンパイル使用メモリ 392,520 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-02-23 21:53:47
合計ジャッジ時間 18,723 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 545 ms
6,676 KB
testcase_02 AC 499 ms
6,676 KB
testcase_03 AC 502 ms
6,676 KB
testcase_04 AC 505 ms
6,676 KB
testcase_05 AC 646 ms
6,676 KB
testcase_06 AC 645 ms
6,676 KB
testcase_07 AC 39 ms
6,676 KB
testcase_08 AC 33 ms
6,676 KB
testcase_09 AC 9 ms
6,676 KB
testcase_10 AC 8 ms
6,676 KB
testcase_11 AC 3 ms
6,676 KB
testcase_12 AC 2 ms
6,676 KB
testcase_13 AC 151 ms
6,676 KB
testcase_14 AC 130 ms
6,676 KB
testcase_15 AC 104 ms
6,676 KB
testcase_16 AC 122 ms
6,676 KB
testcase_17 AC 200 ms
6,676 KB
testcase_18 AC 114 ms
6,676 KB
testcase_19 AC 146 ms
6,676 KB
testcase_20 AC 306 ms
6,676 KB
testcase_21 AC 159 ms
6,676 KB
testcase_22 AC 159 ms
6,676 KB
testcase_23 AC 328 ms
6,676 KB
testcase_24 AC 311 ms
6,676 KB
testcase_25 AC 302 ms
6,676 KB
testcase_26 AC 335 ms
6,676 KB
testcase_27 AC 304 ms
6,676 KB
testcase_28 AC 327 ms
6,676 KB
testcase_29 AC 327 ms
6,676 KB
testcase_30 AC 328 ms
6,676 KB
testcase_31 AC 303 ms
6,676 KB
testcase_32 AC 301 ms
6,676 KB
testcase_33 AC 320 ms
6,676 KB
testcase_34 AC 528 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*
 */
#include<bits/stdc++.h>

#ifdef t9unkubj
#define dbg(x) cout<<__LINE__<<" "<<#x<<":="<<x<<endl;
#else 
#define dbg(x) t9unkubj
#endif

using namespace std;
#include <boost/multiprecision/cpp_int.hpp>

namespace mp = boost::multiprecision;
int main(){
	int t;
	cin>>t;
	for(int _=0;_<t;_++){
		mp::cpp_int n,m;
		cin>>n>>m;
		cout<<(n*(n+1)/2)%m<<endl;
	}
}
0