結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2017-02-19 21:44:44 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 428 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 05:21:38 |
合計ジャッジ時間 | 1,395 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 14 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:14:21: warning: format ‘%c’ expects a matching ‘char *’ argument [-Wformat=] 14 | scanf("%*c%s%lld*%c%c",t,&d,&q); | ~^ | | | char * main.c:13:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s%lld%*c%c",s,&a,&w); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:14:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%*c%s%lld*%c%c",t,&d,&q); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ long long d; long long a; int r; int i; int n; char w; char q; char s[1000]; char t[1000]; scanf("%s%lld%*c%c",s,&a,&w); scanf("%*c%s%lld*%c%c",t,&d,&q); if(a>d){ printf("%s\n",s); }else if(a<d){ printf("%s\n",t); }else if(a==d){ printf("-1\n"); } //for(i=0;i<n;i++){ /*for(r=0;r<n;r++){ if(s[r]==t[r]){ d++; //printf("%d\n",r); } }*/ //} return 0; }