結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-02 18:26:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 505 bytes |
| コンパイル時間 | 1,574 ms |
| コンパイル使用メモリ | 175,308 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 06:26:35 |
| 合計ジャッジ時間 | 2,195 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
map<char, int> m;
for (int i = 0; i < 26; i++) {
int c; cin >> c;
m['a'+i] = c;
}
ll ans = 1;
ans *= m['h'];
ans *= m['e'];
ans *= m['w'];
ans *= m['r'];
ans *= m['d'];
ans *= m['o']/2;
ans *= m['o']/2+m['o']%2;
int l = 0;
for (int i = 2; i <= m['l']-1; i++) {
l = max(l, i * (i-1)/2 * (m['l']-i));
}
ans *= l;
cout << ans << endl;
}