結果
| 問題 | 
                            No.373 かけ算と割った余り
                             | 
                    
| コンテスト | |
| ユーザー | 
                             romNinja
                         | 
                    
| 提出日時 | 2016-06-04 22:36:58 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 251 bytes | 
| コンパイル時間 | 643 ms | 
| コンパイル使用メモリ | 70,600 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-08 08:41:24 | 
| 合計ジャッジ時間 | 2,354 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 2 | 
| other | RE * 5 | 
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:15:29: warning: 'd' is used uninitialized [-Wuninitialized]
   15 |         long long d = (a*b)%d;
      |                             ^
main.cpp:15:19: note: 'd' was declared here
   15 |         long long d = (a*b)%d;
      |                   ^
            
            ソースコード
#include<iostream>
#include<string>
#include<vector>
#include<map>
using namespace std;
unsigned long long a, b,c,d;
int main() {
	cin >> a >> b >> c >> d;
	a = a%d;
	b = b%d;
	c = c%d;
	long long d = (a*b)%d;
	cout << (d*c)%d << endl;
	return 0;
}
            
            
            
        
            
romNinja