結果

問題 No.403 2^2^2
ユーザー takubokudoritakubokudori
提出日時 2017-09-07 23:45:34
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,753 bytes
コンパイル時間 759 ms
コンパイル使用メモリ 94,996 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 01:54:06
合計ジャッジ時間 1,798 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 1 ms
5,376 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:58:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   58 |         scanf("%lld^%lld^%lld",&a,&b,&c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>

#define MOD 1000000007
#define pe(str) return cout<<(str)<<endl,0
#define px(str) {cout<<(str)<<endl;exit(0);}
#define pr(str) cout<<(str)<<endl
#define prpr(str) cout<<str<<endl
#define db(str) cerr<<(str)<<endl
#define dbdb(str) cerr<<str<<endl
#define re(i,n) for(int i=0;i<(n);i++)
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define bw(a,b,c) (((a)<=(b))&&((b)<=(c)))
#define spr(a) setprecision(a)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;

template<class InputIterator>
void dump(InputIterator first,InputIterator last,char delim=' '){
	for(InputIterator it=first;it!=last;it++){
		if(it!=first)cout<<delim;
		cout<<*it;
	}
}


ll p(ll x,ll y){
	if(y==0) return 1;
	ll A=p(x,y/2)%MOD;
	return (y&1?((A*A)%MOD*x)%MOD: (A*A)%MOD);
	// return (y&1?((A*A)*x):(A*A));
}

int main(void){
	ll a,b,c;
	scanf("%lld^%lld^%lld",&a,&b,&c);
	a%=MOD;
	b%=MOD;
	c%=MOD;
	cout<<p(p(a,b),c)<<" "<<p(a,p(b,c))<<endl;
}
/*
int main(void){
	string s;
	cin>>s;
	int c=0;
	sort(s.begin(),s.end());
	do{
		int x=0;
		for(int i=2;i<s.size();i++){
			if(s[i-2]!='0'&&s[i-1]==s[i]&&s[i-1]!=s[i-2]){
				x+=(s[i-2]-'0')*100+(s[i-1]-'0')*10+(s[i]-'0');
				i+=2;
			}
		}
		dump(s.begin(),s.end());
		cout<<endl;
		cout<<x<<endl;
		c=max(x,c);
	}while(next_permutation(s.begin(),s.end()));
	cout<<c<<endl;
	return 0;
}*/
0