結果
| 問題 | No.969 じゃんけん |
| コンテスト | |
| ユーザー |
Kakisuke
|
| 提出日時 | 2020-01-23 13:10:45 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 660 ms |
| コンパイル使用メモリ | 19,840 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 04:40:42 |
| 合計ジャッジ時間 | 1,221 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 WA * 2 |
コンパイルメッセージ
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==0){
ans=1;
}else if(x%2==0){
ans=1;
}else if(x%5==0){
ans=1;
}else{
ans=0;
}
switch(ans){
case 0:
printf("No");
break;
case 1:
printf("Yes");
break;
}
return 0;
}
Kakisuke