結果

問題 No.35 タイパー高橋
ユーザー focusfocus
提出日時 2018-01-30 17:21:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 501 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 64,308 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-28 16:39:21
合計ジャッジ時間 903 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
    string s;
    long long N,n,num,sum=0,ans=0;
    cin >> N;
    while(N--){
        cin >> n >> s;
        num = ((n/1000)*12);
        if((n%1000)!=0&&n>1000)   num++;
        if((s.size()-num)>0){
                sum+=(s.size()-num);
                ans+=num;
        }
        else{
            ans+=s.size();
        }
    }
    cout << ans << ' ' << sum;
    return 0;
}
0