結果
| 問題 |
No.969 じゃんけん
|
| コンテスト | |
| ユーザー |
Kakisuke
|
| 提出日時 | 2020-01-23 13:14:07 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 327 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 04:44:58 |
| 合計ジャッジ時間 | 534 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d",&x);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main()
{
int x,ans;
scanf("%d",&x);
if(x==2){
ans=0;
}else if(x%2==0){
ans=1;
}else {
ans=0;
}
switch(ans){
case 0:
printf("No");
break;
case 1:
printf("Yes");
break;
}
return 0;
}
Kakisuke