結果
| 問題 |
No.256 桁の数字を入れ替え (2)
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-09 14:51:00 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 113 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 06:11:40 |
| 合計ジャッジ時間 | 509 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:3:8: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration]
3 | for(;t=getchar()-10;a[t-38]++);
| ^~~~~~~
main.c:1:1: note: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
+++ |+#include <stdio.h>
1 | int main(){
main.c:4:28: warning: implicit declaration of function ‘putchar’ [-Wimplicit-function-declaration]
4 | for(t=10;t--;)for(;a[t]--;)putchar(48+t);
| ^~~~~~~
main.c:4:28: note: include ‘<stdio.h>’ or provide a declaration of ‘putchar’
ソースコード
int main(){
int a[10]={},t;
for(;t=getchar()-10;a[t-38]++);
for(t=10;t--;)for(;a[t]--;)putchar(48+t);
return 0;
}
testestest