結果
問題 |
No.290 1010
|
ユーザー |
![]() |
提出日時 | 2016-12-12 00:28:20 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 04:11:18 |
合計ジャッジ時間 | 1,094 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
コンパイルメッセージ
main.c: In function ‘func’: main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:10:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%s",s); | ^~~~~~~~~~~~~
ソースコード
#include<stdio.h> int func(void){ int n; scanf("%d",&n); if(n==1) return 0; if(n>=4) return 1; char s[4]; scanf("%s",s); return s[0]==s[1] || (n==3 && s[1]==s[2]); } void run(void){ printf("%s\n",func()?"YES":"NO"); return; } int main(void){ run(); return 0; }