結果
問題 |
No.494 yukicoder
|
ユーザー |
|
提出日時 | 2025-06-16 02:18:34 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 568 bytes |
コンパイル時間 | 3,307 ms |
コンパイル使用メモリ | 275,924 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-16 02:18:39 |
合計ジャッジ時間 | 4,286 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:27:11: warning: ‘result’ may be used uninitialized [-Wmaybe-uninitialized] 27 | cout << result << endl; | ^~~~~~ main.cpp:15:8: note: ‘result’ was declared here 15 | char result; | ^~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// string s; cin >> s; //////////////// 出力変数定義 //////////////// char result; //////////////////// 処理 //////////////////// string t = "yukicoder"; for (int i=0; i<s.size(); i++) { if (s.at(i)=='?') result = t.at(i); } //////////////////// 出力 //////////////////// cout << result << endl; //////////////////// 終了 //////////////////// return 0; }