結果
問題 | No.35 タイパー高橋 |
ユーザー |
![]() |
提出日時 | 2015-05-02 15:01:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 1,035 ms |
コンパイル使用メモリ | 157,548 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 17:28:43 |
合計ジャッジ時間 | 1,439 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&N); | ~~~~~^~~~~~~~~ main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d%s",&T,str); | ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>using namespace std;int main(){int N;int ok=0,ng=0;scanf("%d",&N);while(N--){char str[128];int T;scanf("%d%s",&T,str);int val=12*T/1000;ok+=min(val,(int)strlen(str));ng+=strlen(str)-min(val,(int)strlen(str));}printf("%d %d\n",ok,ng);return 0;}