結果
問題 |
No.3010 水色コーダーさん
|
ユーザー |
![]() |
提出日時 | 2025-03-18 11:56:34 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 180 ms / 2,000 ms |
コード長 | 448 bytes |
コンパイル時間 | 312 ms |
コンパイル使用メモリ | 26,112 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-18 11:56:41 |
合計ジャッジ時間 | 6,967 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d %d",&n,&m); | ^~~~~~~~~~~~~~~~~~~~ main.c:13:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s %s",str[0],str[1]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> void main(void) { int n,m; scanf("%d %d",&n,&m); int count = 0; for(int i = 0 ; i < n ; i++){ char str[2][10000] = {"a","a"}; scanf("%s %s",str[0],str[1]); char decision[100] = "a"; strncpy(decision, str[0], 4); decision[5] = '\0'; if(strcmp(decision,"oooo") != 0 && atoi(str[1]) >= 1200){ count++; } } printf("%d\n",count); }