結果

問題 No.544 Delete 7
ユーザー ianlinathomeianlinathome
提出日時 2017-11-10 06:23:34
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 264 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 22,400 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-21 16:40:05
合計ジャッジ時間 1,986 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 |     scanf("%d",&c);
      |     ~~~~~^~~~~~~~~

ソースコード

diff #

#include <stdio.h>
int main(){
    int a=0,c,temp,len=1;
    scanf("%d",&c);
    temp=c;
    temp/=10;
    while(temp){
        len*=10;
        temp/=10;
    }
    while(len){
        if((c/len)%10==7)a+=len;
        len/=10;
    }
    printf("%d %d\n",a,c-a);
}
0