結果
| 問題 |
No.1942 Leading zero
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-20 21:39:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 2,000 ms |
| コード長 | 369 bytes |
| コンパイル時間 | 1,582 ms |
| コンパイル使用メモリ | 167,500 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-20 07:34:19 |
| 合計ジャッジ時間 | 1,746 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main(){
int n;
cin >> n;
rep(i, n){
string s;
cin >> s;
string t;
rep(i, 5){
if(t.empty() && s[i] == '0') continue;
t.push_back(s[i]);
}
if(t.empty()) t.push_back('0');
cout << t << endl;
}
}