結果
| 問題 | No.9001 標準入出力の練習問題(テスト用) |
| ユーザー |
|
| 提出日時 | 2015-07-18 17:58:32 |
| 言語 | C++11(廃止可能性あり) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 1,000 ms |
| コード長 | 342 bytes |
| 記録 | |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 22,528 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 10:11:38 |
| 合計ジャッジ時間 | 506 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:14: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | fread(z,1,sizeof(z),stdin);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
char z[999999];
static int input_count=0;
int get(){
int r=0;
for(;'0'<=z[input_count]&&z[input_count]<='9';)r=r*10+z[input_count++]-'0';
input_count++;
return r;
}
int getC(){
return z[input_count++];
}
int main(){
fread(z,1,sizeof(z),stdin);
printf("%d ",get()+get());
int c;
for(;(c=getC())>0;)putchar(c);
}