結果

問題 No.73 helloworld
ユーザー h_nosonh_noson
提出日時 2016-02-26 15:23:05
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 553 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 54,336 KB
最終ジャッジ日時 2024-04-27 02:17:45
合計ジャッジ時間 770 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:19:28: error: ‘sqrt’ was not declared in this scope
   19 |     l = round(((double)l+1+sqrt(l*l-l+1))/3);
      |                            ^~~~
main.cpp:19:9: error: ‘round’ was not declared in this scope
   19 |     l = round(((double)l+1+sqrt(l*l-l+1))/3);
      |         ^~~~~

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#define RREP(i,s,e) for (i = e-1; i >= s; i--)
#define rrep(i,n) RREP(i,0,n)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e8

typedef long long ll;

int main() {
    ll i, maxl, ans, l;
    ll c[256];
    REP (i,'a','z'+1) cin >> c[i];
    l = c['l'];
    l = round(((double)l+1+sqrt(l*l-l+1))/3);
    ans = c['h']*c['e']*l*(l-1)/2*(c['l']-l)*(c['o']/2)*((c['o']+1)/2)*c['w']*c['r']*c['d'];
    cout << ans << endl;
    return 0;
}

0