結果
| 問題 | 
                            No.1578 A × B × C
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-09-18 18:28:07 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 594 bytes | 
| コンパイル時間 | 1,296 ms | 
| コンパイル使用メモリ | 89,796 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-30 16:15:45 | 
| 合計ジャッジ時間 | 1,769 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | WA * 22 | 
ソースコード
#include<iostream>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<ios>
#include<iomanip> 
#include<cmath>
#include<limits>
#include<algorithm>
using namespace std;
long long MOD = 1000000007;
int main(){
    long long a,b,c,k;
    cin >> a >> b >> c;
    cin >> k;
    long long tmp_a,tmp_b,tmp_c,tmp_multi;
    long long digit = pow(2.0,k);
    digit %= MOD-1;
    tmp_a = (long long)pow(a,digit);
    tmp_b = (long long)pow(b,digit);
    tmp_c = (long long)pow(c,digit);
    tmp_multi = tmp_a * tmp_b * tmp_c;
    cout << (int)tmp_multi%MOD << endl;
    return 0;
}