結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
6soukiti29
|
| 提出日時 | 2017-08-04 23:05:37 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 404 bytes |
| コンパイル時間 | 2,924 ms |
| コンパイル使用メモリ | 65,152 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-30 01:59:13 |
| 合計ジャッジ時間 | 3,565 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import sequtils,strutils,math
const
a = ord('a')
z = ord('z')
l = ord('l')
var
C : array[a..z,int]
ans = 1
for i in a..z:
C[i] = stdin.readline.parseInt
ans *= C[ord('h')] * C[ord('e')] * C[ord('d')] * C[ord('r')] * C[ord('w')]
var x : int
for i in 1..C[l]:
x = max(x, i * (i - 1) * (C[l] - i) div 2)
ans *= x
ans *= (C[ord('o')] div 2) * ((C[ord('o')] + 1) div 2)
echo ans
6soukiti29