結果
問題 | No.35 タイパー高橋 |
ユーザー |
|
提出日時 | 2015-01-30 16:39:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 524 bytes |
コンパイル時間 | 539 ms |
コンパイル使用メモリ | 65,508 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 04:26:20 |
合計ジャッジ時間 | 1,003 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <utility> #include <string> #include <cmath> using namespace std; int main() { int n, t; string str; cin >> n; int success = 0; int failure = 0; int nc, maxtype; for (int i = 0; i < n; i++) { cin >> t >> str; nc = str.size(); maxtype = floor(12.0 * t / 1000); if (maxtype >= nc) { success += nc; } else { success += maxtype; failure += nc - maxtype; } } printf("%d %d\n", success, failure); return 0; }