結果
問題 | No.35 タイパー高橋 |
ユーザー |
|
提出日時 | 2015-02-15 11:16:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 414 bytes |
コンパイル時間 | 511 ms |
コンパイル使用メモリ | 59,692 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-06-23 20:20:25 |
合計ジャッジ時間 | 832 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <iostream> #include <algorithm> #include <cstring> #include <climits> #include <string> using namespace std; int main() { int N, T, ok = 0, ng = 0; string S; cin >> N; for (int i = 0; i < N; ++i) { cin >> T >> S; int can = T * 12.0 / 1000; int len = S.size(); if (can >= len) ok += len; else { ok += can; ng += len - can; } } cout << ok << " " << ng << endl; return 0; }