結果
問題 | No.264 じゃんけん |
ユーザー |
|
提出日時 | 2016-03-10 13:39:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 171 bytes |
コンパイル時間 | 855 ms |
コンパイル使用メモリ | 55,124 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 17:30:36 |
合計ジャッジ時間 | 931 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:30: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 6 | char *message[3] = { "Drew\n", "Lost\n", "Won\n" }; | ^~~~~~~~ main.cpp:6:40: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 6 | char *message[3] = { "Drew\n", "Lost\n", "Won\n" }; | ^~~~~~~~ main.cpp:6:50: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 6 | char *message[3] = { "Drew\n", "Lost\n", "Won\n" }; | ^~~~~~~
ソースコード
#include <iostream> int main() { int n, k; std::cin >> n >> k; char *message[3] = { "Drew\n", "Lost\n", "Won\n" }; std::cout << message[(n - k + 3) % 3]; return 0; }