結果
| 問題 | No.1942 Leading zero |
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2022-05-21 09:10:13 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 2,000 ms |
| コード長 | 677 bytes |
| 記録 | |
| コンパイル時間 | 836 ms |
| コンパイル使用メモリ | 96,816 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-20 11:14:31 |
| 合計ジャッジ時間 | 1,241 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <set>
#include <cstdio>
#include <string>
using namespace std;
const int dx[] = {0,0,-1,1};
const int dy[] = {-1,1,0,0};
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
for (int i = 0; i < n; i++) {
string t = s[i];
bool f = false;
for (int j = 0; j < 5; j++) {
if (t[j] != '0') {
f = true;
}
if (f) {
cout << t[j];
}
}
if (!f) {
cout << "0";
}
cout << endl;
}
return 0;
}
mmn15277198