結果

問題 No.428 小数から逃げる夢
ユーザー BantakoBantako
提出日時 2017-07-26 00:28:19
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 762 bytes
コンパイル時間 1,361 ms
コンパイル使用メモリ 159,092 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-17 23:40:56
合計ジャッジ時間 3,819 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 1 ms
6,944 KB
testcase_12 AC 1 ms
6,940 KB
testcase_13 AC 1 ms
6,944 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 2 ms
6,944 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 1 ms
6,944 KB
testcase_18 AC 1 ms
6,944 KB
testcase_19 AC 1 ms
6,944 KB
testcase_20 AC 1 ms
6,940 KB
testcase_21 AC 1 ms
6,940 KB
testcase_22 AC 2 ms
6,940 KB
testcase_23 AC 2 ms
6,940 KB
testcase_24 AC 1 ms
6,944 KB
testcase_25 AC 2 ms
6,940 KB
testcase_26 AC 2 ms
6,940 KB
testcase_27 AC 1 ms
6,940 KB
testcase_28 AC 1 ms
6,940 KB
testcase_29 AC 2 ms
6,944 KB
testcase_30 AC 2 ms
6,940 KB
testcase_31 AC 1 ms
6,940 KB
testcase_32 AC 2 ms
6,940 KB
testcase_33 AC 1 ms
6,940 KB
testcase_34 AC 2 ms
6,940 KB
testcase_35 AC 2 ms
6,944 KB
testcase_36 AC 1 ms
6,944 KB
testcase_37 AC 1 ms
6,940 KB
testcase_38 AC 2 ms
6,940 KB
testcase_39 AC 1 ms
6,940 KB
testcase_40 AC 1 ms
6,940 KB
testcase_41 AC 1 ms
6,940 KB
testcase_42 AC 2 ms
6,944 KB
testcase_43 AC 1 ms
6,940 KB
testcase_44 AC 2 ms
6,944 KB
testcase_45 AC 1 ms
6,940 KB
testcase_46 AC 2 ms
6,940 KB
testcase_47 AC 1 ms
6,940 KB
testcase_48 AC 1 ms
6,944 KB
testcase_49 AC 2 ms
6,940 KB
testcase_50 AC 1 ms
6,940 KB
testcase_51 AC 2 ms
6,940 KB
testcase_52 AC 2 ms
6,944 KB
testcase_53 AC 2 ms
6,944 KB
testcase_54 AC 2 ms
6,940 KB
testcase_55 AC 1 ms
6,940 KB
testcase_56 AC 1 ms
6,944 KB
testcase_57 AC 2 ms
6,944 KB
testcase_58 AC 1 ms
6,940 KB
testcase_59 AC 1 ms
6,940 KB
testcase_60 AC 2 ms
6,940 KB
testcase_61 AC 2 ms
6,944 KB
testcase_62 AC 2 ms
6,944 KB
testcase_63 AC 2 ms
6,940 KB
testcase_64 AC 1 ms
6,940 KB
testcase_65 AC 2 ms
6,944 KB
testcase_66 AC 1 ms
6,940 KB
testcase_67 AC 2 ms
6,944 KB
testcase_68 AC 1 ms
6,944 KB
testcase_69 AC 1 ms
6,944 KB
testcase_70 AC 2 ms
6,940 KB
testcase_71 AC 2 ms
6,940 KB
testcase_72 AC 2 ms
6,944 KB
testcase_73 AC 2 ms
6,944 KB
testcase_74 AC 2 ms
6,944 KB
testcase_75 AC 1 ms
6,944 KB
testcase_76 AC 1 ms
6,940 KB
testcase_77 AC 2 ms
6,940 KB
testcase_78 AC 1 ms
6,940 KB
testcase_79 AC 1 ms
6,944 KB
testcase_80 AC 1 ms
6,944 KB
testcase_81 AC 1 ms
6,944 KB
testcase_82 AC 2 ms
6,940 KB
testcase_83 AC 2 ms
6,940 KB
testcase_84 AC 2 ms
6,940 KB
testcase_85 AC 2 ms
6,944 KB
testcase_86 AC 2 ms
6,944 KB
testcase_87 AC 1 ms
6,940 KB
testcase_88 AC 1 ms
6,940 KB
testcase_89 AC 2 ms
6,940 KB
testcase_90 AC 1 ms
6,940 KB
testcase_91 AC 1 ms
6,944 KB
testcase_92 AC 1 ms
6,944 KB
testcase_93 AC 2 ms
6,940 KB
testcase_94 AC 2 ms
6,940 KB
testcase_95 AC 2 ms
6,944 KB
testcase_96 AC 2 ms
6,940 KB
testcase_97 AC 2 ms
6,944 KB
testcase_98 AC 2 ms
6,944 KB
testcase_99 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d",&N);
      |     ~~~~~^~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
int num[192] = {0,0,1,2,3,4,5,6,7,8,9,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,2,0,2,1,2,2,2,3,2,4,2,5,2,6,2,7,2,8,2,9,3,0,3,1,3,2,3,3,3,4,3,5,3,6,3,7,3,8,3,9,4,0,4,1,4,2,4,3,4,4,4,5,4,6,4,7,4,8,4,9,5,0,5,1,5,2,5,3,5,4,5,5,5,6,5,7,5,8,5,9,6,0,6,1,6,2,6,3,6,4,6,5,6,6,6,7,6,8,6,9,7,0,7,1,7,2,7,3,7,4,7,5,7,6,7,7,7,8,7,9,8,0,8,1,8,2,8,3,8,4,8,5,8,6,8,7,8,8,8,9,9,0,9,1,9,2,9,3,9,4,9,5,9,6,9,7,9,8,9,9,1};
main(){
    int N;
    scanf("%d",&N);
    for(int i = 0;i < 192;i++){
        num[i] *= N;
    }
    for(int i = 191;i > 0;i--){
        num[i-1] += num[i]/10;
        num[i] %= 10;
    }
    if(num[0])printf("%d",num[0]);
    printf("%d.",num[1]);
    for(int i = 2;i < 192;i++){
        printf("%d",num[i]);
    }
    printf("\n");
}
0