結果
問題 | No.756 チャンパーノウン定数 (1) |
ユーザー |
|
提出日時 | 2020-02-08 20:28:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 185 bytes |
コンパイル時間 | 110 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 05:21:58 |
合計ジャッジ時間 | 1,050 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:3:16: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3 | int D;scanf("%d",&D); | ~~~~~^~~~~~~~~
ソースコード
#include <cstdio> int main(){ int D;scanf("%d",&D); if(D<10)printf("%d\n",D); else if(D%2==0)printf("%d\n",(D+10)/20); else printf("%d\n",((D+10)/2)%10); return 0; }