結果

問題 No.1713 trick or treat!
ユーザー hari64hari64
提出日時 2021-10-22 21:23:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,723 bytes
コンパイル時間 1,480 ms
コンパイル使用メモリ 169,484 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 12:11:27
合計ジャッジ時間 2,000 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

// clang-format off
namespace viewer {template<class T>string f(T i){string s=(i==1001001001||i==1001001001001001001?"inf":to_string(i));s=string(max(0,3-(int)s.size()),' ')+s;return s;} 
void view(const char c,string end="\n"){cerr<<c<<end;} void view(const string&s,string end="\n"){cerr<<s<<end;} template<class T>void view(const T&x,string end="\n"){cerr<<f(x)<<end;}
template<class T0,class T1>void view(const pair<T0,T1>&p,string end="\n"){cerr<<"("<<f(get<0>(p))<<", "<<f(get<1>(p))<<")"<<end;} template<class T0,class T1>void view(const tuple<T0,T1>&p,string end="\n"){cerr<<"("<<f(get<0>(p))<<", "<<f(get<1>(p))<<")"<<end;}
template<class T0,class T1,class T2>void view(const tuple<T0,T1,T2>&t,string end="\n"){cerr<<"("<<f(get<0>(t))<<", "<<f(get<1>(t));cerr<<", "<<f(get<2>(t))<<")"<<end;}
template<class T0,class T1,class T2,class T3>void view(const tuple<T0,T1,T2,T3>&t,string end="\n"){cerr<<"("<<f(get<0>(t))<<", "<<f(get<1>(t))<<", "<<f(get<2>(t))<<", "<<f(get<3>(t))<<")"<<end;}
template<class T>void view(const vector<T>&vx,string _end=""){bool is_value=is_integral<T>();cerr<<"{"<<(vx.empty()||is_value?"":"\n");for(const T&x:vx){if(!is_value)cerr<<"  ";view(x,(is_value?",":"\n"));};cerr<<"}\n"<<_end;}
template<class T>void view(const set<T>&s){vector<T>v(s.begin(),s.end());view(v);} template<class T>void view(const multiset<T>&s){vector<T>v(s.begin(),s.end());view(v);}
template<class T>void view(const unordered_set<T>&s){vector<T>v(s.begin(),s.end());view(v);} template<class T>void view(const deque<T>&s){vector<T>v(s.begin(),s.end());view(v);}
template<class T>void view(const priority_queue<T>&p){priority_queue<T>q=p;vector<T>v;while(!q.empty()){v.push_back(q.top());q.pop();}view(v);}
template<class T,class U>void view(const map<T, U>&m){cerr<<"{"<<(m.empty()?"":"\n");for(const auto&kv:m){cerr<<"  [";view(kv.first,"");cerr<<"] : ";view(kv.second,"");cerr<<"\n";}cerr<<"}\n";}
template<class T>void _view(const T&var,string var_name,int line_num){cerr<<line_num<<": "<<var_name<<" = ";view(var);}
void view_grid(const vector<vector<bool>>&vvb){cerr<<"\n";for(const vector<bool>&vb:vvb){for(const bool&b:vb)cerr<<(b?".":"#");cerr<<"\n";}}} //グリッド用 "."と"#"は交換可
// clang-format on

#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
#define debug(var) viewer::_view(var, #var, __LINE__)

constexpr int INF = 1001001001;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    int M;
    cin >> M;
    long long ans = 1;
    for (int i = 1; i <= (N | M); i++) {
        ans *= (long long)i;
    }

    cout << ans << endl;
    return 0;
}
0