結果

問題 No.3603 What Question Number Are We On?
コンテスト
ユーザー Javohir
提出日時 2026-08-13 13:43:54
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.90.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 324 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,815 ms
コンパイル使用メモリ 152,640 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-13 13:44:01
合計ジャッジ時間 5,413 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 3 WA * 39
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:12:17: warning: 'i' is used uninitialized [-Wuninitialized]
   12 |         while (i!=t) {
      |                ~^~~
main.cpp:9:16: note: 'i' was declared here
    9 |         int t, i;
      |                ^

ソースコード

diff #
raw source code

#include <iostream>

using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
	int t, i;
	cin >> t;
	
	while (i!=t) {
		i+=1;
		string input;
		cin >> input;
		if ((int)input[0] == 1) {
			cout << (int)input[2] +(int)input[4] << endl;
		} else {
			cout << i << endl;
		}
	}
	return 0;
}
0