結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-12 10:55:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 505 bytes |
| コンパイル時間 | 426 ms |
| コンパイル使用メモリ | 55,872 KB |
| 最終ジャッジ日時 | 2024-11-14 21:38:50 |
| 合計ジャッジ時間 | 786 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:18:18: error: ‘floor’ was not declared in this scope
18 | int tp = floor((tm / 1000.0) * 12);
| ^~~~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
int tm;
string str;
int ok = 0;
int ng = 0;
for (int i = 0; i < n; i++) {
cin >> tm >> std::ws >> str;
int tp = floor((tm / 1000.0) * 12);
if (str.length() > tp) {
ok += tp;
ng += str.length() - tp;
} else {
ok += str.length();
}
}
cout << ok << " " << ng << endl;
}