結果

問題 No.373 かけ算と割った余り
ユーザー chacoder1
提出日時 2021-05-01 14:19:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 3,331 ms
コンパイル使用メモリ 190,788 KB
最終ジャッジ日時 2025-01-21 05:11:39
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long

signed main(void) {
  ll a,b,c,d;
  cin>>a>>b>>c>>d;
  ll ans=a%d;
  ans*=b;
  ans%=d;
  ans*=c;
  ans%=d;
  cout<<ans<<endl;
  return 0;
}
0