結果
問題 |
No.35 タイパー高橋
|
ユーザー |
![]() |
提出日時 | 2025-03-10 09:49:26 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 552 ms |
コンパイル使用メモリ | 26,112 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-10 09:49:27 |
合計ジャッジ時間 | 1,000 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:21:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=] 21 | printf("%d %d\n", &okChar , &outChar ); | ~^ ~~~~~~~ | | | | int int * | %ls main.c:21:21: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int *’ [-Wformat=] 21 | printf("%d %d\n", &okChar , &outChar ); | ~^ ~~~~~~~~ | | | | int int * | %ls main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:11:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d %s",&inputTime,inputStr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> const double CharTime = 1000/12; void main(void){ int n = 0; scanf("%d",&n); int inputTime = 0 ,okChar = 0 , outChar = 0 ; char inputStr[1000] = "a"; for(int i = 0 ; i < n ; i++ ){ scanf("%d %s",&inputTime,inputStr); int charNum = 0; while(inputTime > charNum*CharTime){ charNum++; } okChar += charNum-1; outChar += (int)strlen(inputStr) - charNum; } printf("%d %d\n", &okChar , &outChar ); }