結果
| 問題 | No.441 和か積 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-11 23:01:18 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 487 bytes |
| 記録 | |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 29,512 KB |
| 最終ジャッジ日時 | 2026-02-23 22:50:36 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s%s",s,t);
| ^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(void){
int x,y,c=0;
char s[256],t[256];
scanf("%s%s",s,t);
x = strcmp(s,"0");
y = strcmp(t,"0");
if(!(x) && !(y)){printf("E\n");return 0;}
x = strcmp(s,"2");
y = strcmp(t,"2");
if(!(x) && !(y)){printf("E\n");return 0;}
x = strcmp(s,"0");
if(x == 0){c=1;}
x = strcmp(s,"1");
if(x == 0){c=1;}
x = strcmp(t,"0");
if(x == 0){c=1;}
x = strcmp(t,"1");
if(x == 0){c=1;}
if(c){printf("S\n");return 0;}
printf("P\n");
return 0;
}