結果
| 問題 | No.1335 1337 |
| コンテスト | |
| ユーザー |
subsn
|
| 提出日時 | 2023-06-20 10:03:03 |
| 言語 | C11(gcc12 gnu拡張) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 208 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 29,000 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-08 16:35:05 |
| 合計ジャッジ時間 | 558 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
コンパイルメッセージ
main.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | main(){
| ^~~~
main.c: In function ‘main’:
main.c:4:9: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
4 | memset(t,0,sizeof(char)*11);
| ^~~~~~
main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’
+++ |+#include <string.h>
1 | main(){
main.c:4:9: warning: incompatible implicit declaration of built-in function ‘memset’ [-Wbuiltin-declaration-mismatch]
4 | memset(t,0,sizeof(char)*11);
| ^~~~~~
main.c:4:9: note: include ‘<string.h>’ or provide a declaration of ‘memset’
main.c:6:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
6 | scanf("%s\n%s",&t,&s);
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | main(){
main.c:6:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
6 | scanf("%s\n%s",&t,&s);
| ^~~~~
main.c:6:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:6:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[11]’ [-Wformat=]
6 | scanf("%s\n%s",&t,&s);
| ~^ ~~
| | |
| char * char (*)[11]
main.c:6:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char (*)[101]’ [-Wformat=]
6 | scanf("%s\n%s",&t,&s);
| ~^ ~~
| | |
| | char (*)[101]
| char *
main.c:7:23: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
7 | for(int i=0;i<strl
ソースコード
main(){
char t[11];
char s[101];
memset(t,0,sizeof(char)*11);
memset(s,0,sizeof(char)*101);
scanf("%s\n%s",&t,&s);
for(int i=0;i<strlen(s);i++)isdigit(s[i])?printf("%c",t[s[i]-'0']):printf("%c",s[i]);
}
subsn