結果
問題 | No.285 消費税2 |
ユーザー |
![]() |
提出日時 | 2015-11-05 20:52:46 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 234 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 21,504 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 12:50:24 |
合計ジャッジ時間 | 1,038 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%lld",&d); | ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<string.h> int main(void){ long long int d,p,i; char c[16]; scanf("%lld",&d); sprintf(c,"%lld",d*108); p = strlen(c); for(i=0;i<p;i++){ if(i == p-2) printf("."); printf("%c",c[i]); } return 0; }