結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2017-02-19 21:51:20 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 422 bytes |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 19,840 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 05:22:31 |
| 合計ジャッジ時間 | 1,018 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 14 |
コンパイルメッセージ
main.c: In function ‘main’:
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("%s%lld%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("%s%lld%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;
}
Haijinn