結果

問題 No.373 かけ算と割った余り
ユーザー kitswd11
提出日時 2016-09-13 15:43:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 424 ms
コンパイル使用メモリ 54,332 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-17 04:53:31
合計ジャッジ時間 869 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main()
{
	long long a[4];

	int ans = 0;

	for (int i = 0; i < 4; ++i) {
		std::cin >> a[i];
	}

	ans = a[0] % a[3];

	for (int i = 1; i < 3; ++i) {
		ans = ans * a[i] % a[3];
	}
	std::cout << ans << std::endl;
}
0