結果
問題 |
No.1942 Leading zero
|
ユーザー |
![]() |
提出日時 | 2022-05-20 21:29:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 2,000 ms |
コード長 | 539 bytes |
コンパイル時間 | 3,388 ms |
コンパイル使用メモリ | 230,368 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-20 07:19:17 |
合計ジャッジ時間 | 3,768 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; //const long nPrime = 1000000007; //const long nPrime = 998244353; typedef long long ll; int main() { ll n; cin >> n; while(n--){ string s; cin >> s; for(ll i = 0; i < 5; i++){ if(i == 4 || s[i] != '0'){ for(ll j = i; j < 5; j++){ cout << s[j]; } cout << endl; break; } } } return 0; }