結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-26 11:42:35 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 418 bytes |
| コンパイル時間 | 2,179 ms |
| コンパイル使用メモリ | 193,472 KB |
| 最終ジャッジ日時 | 2025-01-07 07:33:17 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:13: warning: ‘n’ is used uninitialized [-Wuninitialized]
9 | while (n--) {
| ~^~
main.cpp:6:9: note: ‘n’ was declared here
6 | int n;
| ^
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
int typed = 0;
int missed = 0;
while (n--) {
int t; string s;
cin >> t >> s;
int can = 12*t/1000;
if (can < s.size()) {
missed += s.size()-can;
typed += can;
} else typed += s.size();
}
cout << typed << ' ' << missed << endl;
return 0;
}