結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
piyoko_212
|
| 提出日時 | 2015-12-28 23:51:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 310 bytes |
| コンパイル時間 | 391 ms |
| コンパイル使用メモリ | 34,000 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 08:14:15 |
| 合計ジャッジ時間 | 635 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:20: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | int a;scanf("%d",&a);
| ~~~~~^~~~~~~~~
main.cpp:11:28: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | int t;scanf("%d%s",&t,in);
| ~~~~~^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
char in[2100];
int main(){
int a;scanf("%d",&a);
int A=0;
int B=0;
while(a--){
int t;scanf("%d%s",&t,in);
int s=strlen(in);
int can=t*12/1000;
if(s>can){
B+=s-can;
A+=can;
}else A+=s;
}
printf("%d %d\n",A,B);
}
piyoko_212