結果

問題 No.373 かけ算と割った余り
コンテスト
ユーザー でばら焼肉のたれ
提出日時 2026-09-03 16:34:41
言語 C
(gcc 15.3.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 2,000 ms
+ 744µs
コード長 306 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,416 ms
コンパイル使用メモリ 32,512 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-09-03 16:34:52
合計ジャッジ時間 1,423 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

int main(void)
{
	unsigned long long a, b, c, d;
	unsigned long long ans, ans1, ans2, ans3, ans4;

	scanf("%llu %llu %llu %llu", &a, &b, &c, &d);
	
	ans1 = a % d;
	ans2 = b % d;
	ans3 = c % d;

	ans4 = (ans1 * ans2) % d;
	ans = (ans4 * ans3) % d;

	printf("%llu\n", ans);

	return 0;
}
0