結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-05 03:28:36 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 212 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 01:22:25 |
| 合計ジャッジ時間 | 565 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&t);
| ^~~~~~~~~~~~~~
main.c:7:20: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | x=0;i=4;while(i--){scanf("%d",&y);x|=1<<y;}
| ^~~~~~~~~~~~~~
main.c:8:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%s",s);n&=*s-78?x:~x;
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int n=1023,t,i,x,y;
char s[4];
scanf("%d",&t);
while(t--){
x=0;i=4;while(i--){scanf("%d",&y);x|=1<<y;}
scanf("%s",s);n&=*s-78?x:~x;
}
while(n/=2)i++;
printf("%d\n",i+1);
return 0;
}
testestest