結果

問題 No.35 タイパー高橋
ユーザー A63295A63295
提出日時 2016-01-06 22:35:17
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 304 bytes
コンパイル時間 468 ms
コンパイル使用メモリ 21,084 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 16:18:35
合計ジャッジ時間 959 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 | scanf("%d", &N);
      | ^~~~~~~~~~~~~~~
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf ( "%d%s", &T, S);
      |         ^~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<string.h>
int main(void){
int i, k, N, T, goukei =0, a= 0;
char S[101];
scanf("%d", &N);
for ( i = 0; i < N; i++){
	scanf ( "%d%s", &T, S);
	k = strlen (S);
	T = 12 * T / 1000;
	a += ( k > T) ? k - T: 0;
	goukei += ( k > T) ? T: k;

}
printf ( "%d %d", goukei, a);
	return 0;
}
0