結果
問題 | No.73 helloworld |
ユーザー |
|
提出日時 | 2020-04-12 03:43:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 725 bytes |
コンパイル時間 | 780 ms |
コンパイル使用メモリ | 68,388 KB |
最終ジャッジ日時 | 2025-01-09 17:35:39 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include <iostream>#include <string>using lint = long long;const std::string one = "hewrd";void solve() {lint ans = 1;for (char c = 'a'; c <= 'z'; ++c) {lint x;std::cin >> x;for (auto d : one) {if (c == d) ans *= x;}if (c == 'o') {ans *= (x / 2) * (x - x / 2);}if (c == 'l') {lint max = 0;for (int k = 0; k <= x; ++k) {max = std::max(max, (x - k) * (x - k - 1) * k / 2);}ans *= max;}}std::cout << ans << std::endl;}int main() {std::cin.tie(nullptr);std::ios::sync_with_stdio(false);solve();return 0;}