結果

問題 No.668 6.0*10^23
ユーザー posaune-0xa0
提出日時 2018-06-27 17:03:22
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 28,288 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-30 23:10:21
合計ジャッジ時間 1,603 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
    char str[101010];
    scanf("%s", str);
    long c;
    int a = (int)str[0]-48, b = (int)str[1]-48;
    for(c=0; str[c] != '\0'; c++);
    if((int)str[2]-48 >= 5)
    {
        b++;
        if(b == 10)
        {
            b = 0;
            a++;
            if(a == 10)
            {
                a = 1;
                c++;
            }
        }
    }

    printf("%d"".""%d*10^%ld", a, b, c-1);
    return 0;
}
0