結果
| 問題 |
No.494 yukicoder
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-01 16:09:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 375 bytes |
| コンパイル時間 | 484 ms |
| コンパイル使用メモリ | 64,380 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 00:12:05 |
| 合計ジャッジ時間 | 979 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:18:8: warning: ‘ans’ may be used uninitialized in this function [-Wmaybe-uninitialized]
18 | char ans;
| ^~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
string ref = "yukicoder";
string S;
cin >> S;
char ans;
for(int i=0;i<S.size();i++){
if(S.at(i) == '?'){
ans = ref.at(i);
break;
}
}
cout << ans << endl;
return 0;
}