結果
問題 | No.35 タイパー高橋 |
ユーザー |
|
提出日時 | 2016-02-10 05:49:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 612 bytes |
コンパイル時間 | 472 ms |
コンパイル使用メモリ | 63,440 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 22:04:23 |
合計ジャッジ時間 | 945 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <cmath> #include <cstdlib> #include <iostream> int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int n; std::cin >> n; std::string::size_type cnt1 = 0, cnt2 = 0; for (int i = 0; i < n; i++) { std::string::size_type t; std::string s; std::cin >> t >> s; std::string::size_type nType = static_cast<std::string::size_type>(std::floor(12 * t / 1000)); if (nType < s.length()) { cnt1 += nType; cnt2 += s.length() - nType; } else { cnt1 += s.length(); } } std::cout << cnt1 << ' ' << cnt2 << std::endl; return EXIT_SUCCESS; }