結果
問題 | No.264 じゃんけん |
ユーザー |
|
提出日時 | 2023-01-23 17:30:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 444 ms |
コンパイル使用メモリ | 27,264 KB |
最終ジャッジ日時 | 2025-02-10 06:29:13 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:13:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d%d",&me,&enemy); | ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> enum Hand { Rock, Scissors, Paper, }; int main(){ int me; int enemy; scanf("%d%d",&me,&enemy); if(me-enemy==-1||me-enemy==2){ printf("Won"); }else if(me==enemy){ printf("Drew"); }else{ printf("Lost"); } }