結果
問題 | No.1713 trick or treat! |
ユーザー |
|
提出日時 | 2021-10-22 22:19:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 1,869 ms |
コンパイル使用メモリ | 186,716 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 05:55:32 |
合計ジャッジ時間 | 2,322 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#define _GLIBCXX_DEBUG #define ll long long #include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; int main(){ int A, B; cin >> A >> B; int ans = 0, i = 8; while(i != 0){ if(i <= A or i <= B){ ans += i; } A %= i; B %= i; i /= 2; } ll ans2 = 1; while(ans != 0){ ans2 *= ans; ans--; } cout << ans2 << endl; }