QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#718782 | #6768. Nihongo wa Muzukashii Desu | 333zhan | AC ✓ | 1ms | 3848kb | C++20 | 1.2kb | 2024-11-06 21:26:06 | 2024-11-06 21:26:07 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
using namespace std;
void solve () {
string s;
cin >> s;
if (s.find ("chimasu") != -1) {
cout << s.substr (0, s.size () - 7) + "tte" << '\n';
} else if (s.find ("rimasu") != -1) {
cout << s.substr (0, s.size () - 6) + "tte" << '\n';
} else if (s.find ("mimasu") != -1) {
cout << s.substr (0, s.size () - 6) + "nde" << '\n';
} else if (s.find ("bimasu") != -1) {
cout << s.substr (0, s.size () - 6) + "nde" << '\n';
} else if (s.find ("nimasu") != -1) {
cout << s.substr (0, s.size () - 6) + "nde" << '\n';
} else if (s == "ikimasu") {
cout << "itte" << '\n';
} else if (s.find ("kimasu") != -1) {
cout << s.substr (0, s.size () - 6) + "ite" << '\n';
} else if (s.find ("gimasu") != -1) {
cout << s.substr (0, s.size () - 6) + "ide" << '\n';
} else {
cout << s.substr (0, s.size () - 4) + "te" << '\n';
}
}
signed main () {
ios::sync_with_stdio (false);
cin.tie (nullptr);
int T = 1;
cin >> T;
while (T --) {
solve ();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3848kb
input:
10 machimasu kaerimasu nomimasu yobimasu shinimasu kakimasu ikimasu kikimasu isogimasu kashimasu
output:
matte kaette nonde yonde shinde kaite itte kiite isoide kashite
result:
ok 10 lines
Test #2:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
63 machimasu kaerimasu nomimasu yobimasu shinimasu kakimasu ikimasu isogimasu kashimasu hatarakimasu yasumimasu owarimasu yomimasu kikimasu torimasu okurimasu kirimasu karimasu arimasu kakarimasu asobimasu oyogimasu kawakimasu sukimasu mochimasu hanashimasu hurimasu hairimasu suwarimasu tachimasu ke...
output:
matte kaette nonde yonde shinde kaite itte isoide kashite hataraite yasunde owatte yonde kiite totte okutte kitte katte atte kakatte asonde oyoide kawaite suite motte hanashite hutte haitte suwatte tatte keshite shitte sunde omoikishite oite utte tsukutte notte oshite oroshite dashite kaeshite meide...
result:
ok 63 lines