結果
| 問題 | 
                            No.373 かけ算と割った余り
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-06-12 09:11:07 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 317 bytes | 
| コンパイル時間 | 408 ms | 
| コンパイル使用メモリ | 54,964 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-09 13:04:29 | 
| 合計ジャッジ時間 | 856 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 5 | 
ソースコード
// http://yukicoder.me/problems/748
#include <cstdint>
#include <cstdlib>
#include <iostream>
int
main()
{
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  std::int64_t a, b, c, d;
  std::cin >> a >> b >> c >> d;
  std::cout << ((a % d) * (b % d) % d * (c % d) % d) << std::endl;
  return EXIT_SUCCESS;
}