17 lines
260 B
C++
17 lines
260 B
C++
#include <cstdio>
|
|
using namespace std;
|
|
|
|
char s[3005];
|
|
char name[3005];
|
|
char buf[3005];
|
|
|
|
int main() {
|
|
while (~scanf("%[^\n]\n", s)) {
|
|
sscanf(s, "%[^:]", name);
|
|
sprintf(buf, "%s.txt", name);
|
|
freopen(buf, "w", stdout);
|
|
printf("%s\n", s);
|
|
}
|
|
return 0;
|
|
}
|