結果
| 問題 |
No.2960 Judgement
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-17 11:39:44 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 777 ms |
| コード長 | 338 bytes |
| コンパイル時間 | 382 ms |
| コンパイル使用メモリ | 25,344 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-17 11:39:46 |
| 合計ジャッジ時間 | 1,449 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%s",result);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
void main(void){
char result[100] = "a";
int count = 0;
for(int i = 0 ; i < 8 ; i++){
scanf("%s",result);
if(strcmp(result,"AC") == 0 || strcmp(result,"NoOut") == 0){
count++;
}
}
if(count >= 6){
printf("Win");
}else if(count == 5){
printf("Draw");
}else{
printf("Lose");
}
}
Maeda